- Posts: 40
COMMUNITY FORUM
Modal opens various content
- John-Eilif Eliassen
-
Topic Author
- Offline
- Senior Member
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
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
-
Topic Author
- Offline
- Senior Member
- Posts: 40
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
-
Topic Author
- Offline
- Senior Member
- Posts: 40
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
-
- Offline
- Platinum Member
- Posts: 15920
Which version of K2 and Joomla! are you using?
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
-
Topic Author
- Offline
- Senior Member
- Posts: 40
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
-
- Offline
- Platinum Member
- Posts: 15920
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?
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
-
Topic Author
- Offline
- Senior Member
- Posts: 40
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
-
Topic Author
- Offline
- Senior Member
- Posts: 40
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
-
- Offline
- Platinum Member
- Posts: 15920
However, to be extra safe you should backup prior to the update.
Please Log in or Create an account to join the conversation.
- John-Eilif Eliassen
-
Topic Author
- Offline
- Senior Member
- Posts: 40
Krikor wrote: 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.
We do daily backups of both database and root folder with all content so that wont be a problem. I have overridden the files right in k2 component, not in template/html folder.
I read somewhere that joomla has increased in speed, is this correct? Somewhere it said 2x but thats too good to be true.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Supposedly with PHP7 it is blazingly fast.
To be honest, Joomla! sites with a solid server setup were already fast.
Please Log in or Create an account to join the conversation.