- Posts: 67
COMMUNITY FORUM
Image upload error K2.7 and J3.5
- Litho-Verlag e.K.
-
- Offline
- Senior Member
The solution above works for "create a new article" in the frontend. But if I edit an existing article, K2 opens not in a new box. It will be open in the same windows and I cannot close this window with "save" or "close".
Does anybody share my problem?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Can you try the same with the default template?
This sounds more like a template issue.
Please Log in or Create an account to join the conversation.
- Ami Ella
-
- Offline
- New Member
- Posts: 2
I also confirm Miroslav solution but only for items.
It did not solve the issue in categories.
This goes for both sites.
276-279 in administrator/components/com_k2/models/item.php
Change '===' by '==' resolved the issue.
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.
- Litho-Verlag e.K.
-
- Offline
- Senior Member
- Posts: 67
In backend Administrator/Components/com_k2 which folder?
In root/components/com_k2/templates/defalut/item.php I can not find a "===" triple to replace it.
and the same in the templates/mytempl/html/com_k2/templates/default/item.php
So where is it to fix?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
I fix that in item.php file (K2 administrator\components\com_k2\models) and alternated lines (around 276-279):
Or you can use the DEV version - github.com/getk2/k2/archive/master.zip
Please Log in or Create an account to join the conversation.
- Alexander Elkin
-
- Offline
- New Member
- Posts: 11
Miroslav wrote: I fix that in item.php file (K2 administrator\components\com_k2\models) and alternated lines (around 276-279):
if (($files === 0 || $existingImage) && !JRequest::getBool('del_image'))
changed to
if (($files == 0 || $existingImage) && !JRequest::getBool('del_image'))
and
if ($files === 0)
changed to
if ($files == 0)
It works!
Please Log in or Create an account to join the conversation.
- DC10555
-
- Offline
- New Member
- Posts: 1
Thanks Miroslav! Anyone know if I can do this as an override in my template? I tried adding it to a:
TEMPLATE\html\com_k2\models\item.php
but it doesn't work..
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
It is already included in the DEV version and it will be included in the next stable release.
Please Log in or Create an account to join the conversation.
- Massimo Di Primio
-
- Offline
- New Member
The chunk of code in administrator/components/com_k2/models/item.php in my test installation is a bit different from the one mentioned by Miroslav.
This is what I've found at lines around 276-279.
if (($files['image']['error'] === 0 || $existingImage) && !JRequest::getBool('del_image'))
{
if ($files['image']['error'] === 0)
I'm not using any other extensions, only K2.7 and J3.5.1 on.PHP 5.4.16
Anyway, trying to replae '===' with '==' does not seem to solve the issue.
Any idea?
-- Massix
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.
- Supero ltd
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Jeffrey Hayes
-
- Offline
- New Member
- Posts: 3
Changing to PHP 7.0.4 resolved the issue.
Please Log in or Create an account to join the conversation.
- Kurt Schneider
-
- Visitor
php : 5.6.21
jm : 3.5.1
k2 : 2.7.0
The solostation in my case was changing "===" into "==" on line 276 and 279
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.
- Moussa
-
- Offline
- New Member
- Posts: 2
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.
- web-tiki
-
- Offline
- New Member
- Posts: 6
My configuration:
php 7.0.6
joomla 3.6.0
K2 2.7.0
Please Log in or Create an account to join the conversation.
- Ignacio Gómez
-
- Offline
- New Member
- Posts: 10
Config: Joomla 3.6.2 / PhP 5.6.22 / K2 2.7.1
Unfortunately I cannot move to PHP 7.0.x in my current hosting. I would really appreciate any suggestion...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Which other extensions are you using?
Please Log in or Create an account to join the conversation.