Keyword

Modal opens various content

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago - 8 years 3 months ago #155748 by John-Eilif Eliassen
Modal opens various content was created by John-Eilif Eliassen
Article edit mode in modal..

Issue:
- Edit class="modal" link to article editing displays either: A) The proper edit page in modal window B) The article itself in modal window

I can not understand why it sometimes open the correct editorial window, but sometimes it opens the article itself in the same window, on the same article even. And if my coworker enters the same article, he is experiencing the same fault at any given article.

It seems it is random if the article is editable or not. I dont know what code is relevant except the code i've added at the bottom. So if more code is needed. Please, for the love of sweet nachos, help me.

The code that displays the edit link:
<ul class="articleActions">

<!-- EDIT Button --> 
<?php if(isset($this->item->editLink)): ?>
<a class="modal hasTooltip" title="Rediger" rel="{handler:'iframe',size:{x:1100,y:800}}" href="<?php echo $this->item->editLink; ?>">
<li><i class="fa fa-pencil-square-o" aria-hidden="true"></i></li>
</a>
<?php endif; ?>

<!-- PRINT Button --> 
<?php if($this->item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
<a class="itemPrintLink hasTooltip" title="Skriv ut" rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;">
<li><i class="fa fa-print" aria-hidden="true"></i></li></a>
<?php endif; ?>

<!-- MAIL Button --> 
<?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
<a class="itemEmailLink hasTooltip" title="Send som E-post" rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;">
<li><i class="fa fa-envelope" aria-hidden="true"></i></li></a>
<?php endif; ?>

<!-- LEST Button --> 
<?php if($this->item->params->get('itemHits')): ?>
<li class="hasTooltip" title="Lest <?php echo $this->item->hits; ?> ganger"><i class="fa fa-eye" aria-hidden="true"></i></li><?php endif; ?>

</ul>

I added some screenshots of the same article being opened, without any code tampering in between.

imgur.com/G2i3u82
imgur.com/rdzbNZc

The actuall adress it opens when calling for editLink is this:
index.php?option=com_k2&view=item&task=edit&cid=25&tmpl=component
Last edit: 8 years 3 months ago by John-Eilif Eliassen.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155761 by Krikor Boghossian
Replied by Krikor Boghossian on topic Modal opens various content
The code seems correct, but can you try browsing this URL with another template?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155783 by John-Eilif Eliassen
Replied by John-Eilif Eliassen on topic Modal opens various content
Hi Krikor,

Thanks for your reply. I do actually not believe it is something with the template... I can see that in the backend, those articles that are causing troubles... seems to not actually be in checked out state. May that be the reason for the misbehaviour? I cannot edit those articles from the backend either, or check them out.

imgur.com/duhpExr
imgur.com/8r3Wx0v

Please Log in or Create an account to join the conversation.

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155787 by John-Eilif Eliassen
Replied by John-Eilif Eliassen on topic Modal opens various content
I found this thread, and this seems to be my issue. But the "resolved" reference is not available. Do you have any idea how it was fixed?

www.joomlaworks.net/forum/k2-en/20280-front-end-article-stays-checked-in

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155797 by Krikor Boghossian
Replied by Krikor Boghossian on topic Modal opens various content
This post is 6+ years old, I doubt that it is still relevant with the newer versions of K2, although Kudos for searching :)

Which version of K2 and Joomla! are you using?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155809 by John-Eilif Eliassen
Replied by John-Eilif Eliassen on topic Modal opens various content

Krikor wrote: This post is 6+ years old, I doubt that it is still relevant with the newer versions of K2, although Kudos for searching :)

Which version of K2 and Joomla! are you using?


Yes i know it was old af, but the exact issue is relevant to my problem as i have to use global check-in in the backend all the time. Ive started editing articles in backend just because of this. It seems that if i save articles in frontend, and uses the X in modal to close the box after each save, then the item is not locked in editorial state (checked out).
PHP Built On 	Windows NT SRV-APP-07 6.2 build 9200 (Unknown Windows version Standard Edition) i586
Database Version 	5.6.22-log
Database Collation 	utf8_general_ci
PHP Version 	5.4.26
Web Server 	Apache/2.4.9 (Win32) PHP/5.4.26
WebServer to PHP Interface 	apache2handler

Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
K2 v2.6.9

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155813 by Krikor Boghossian
Replied by Krikor Boghossian on topic Modal opens various content
Actually both Joomla! and K2 are outdated.
In fact this Joomla! version contains security issues.
Can you update to Joomla! 3.5.1 and K2's latest DEV - github.com/getk2/k2 - version?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155815 by John-Eilif Eliassen
Replied by John-Eilif Eliassen on topic Modal opens various content

Krikor wrote: Actually both Joomla! and K2 are outdated.
In fact this Joomla! version contains security issues.
Can you update to Joomla! 3.5.1 and K2's latest DEV - github.com/getk2/k2 - version?


I knew this, but didnt bother to upgrade since there are no security issues on the server I am working on. I will upgrade.

Please Log in or Create an account to join the conversation.

  • John-Eilif Eliassen
  • John-Eilif Eliassen's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155819 by John-Eilif Eliassen
Replied by John-Eilif Eliassen on topic Modal opens various content
I am sorry for not bringing up the version issue beforehand. I didnt even think of it as a possible factor as it seemed to work a while and suddenly stop working after using modal for editing.

Such a hassle to upgrade serverphp to 7 but oh joy im looking forward to testing new versions of both joomla and k2 :)

One question krikor, is there a lot of changes in category/item/category_item files in the new version? Or is it mainly backend changes that are made? I have edited most files in both component and module to fit our need perfectly.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155828 by Krikor Boghossian
Replied by Krikor Boghossian on topic Modal opens various content
Not too many. Mostly minor visual edits, a new itemform.php layout, but if you are using overrides the update will not affect you.

However, to be extra safe you should backup prior to the update.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum