- Posts: 7
COMMUNITY FORUM
Problem with add image from server after upgrade
- Igor
- Topic Author
- Offline
- New Member
Less
More
7 years 2 months ago - 7 years 2 months ago #164089
by Igor
«New projects from idea to result»
Problem with add image from server after upgrade was created by Igor
Hi
Try add image + save k2 item =
ERROR MESSAGE
The image was not uploaded. Please ensure that you used a valid image file and that file uploads are properly configured on your server.
====================
Image of path preset attached
imgur.com/DqOJuHX
media/library
and K2 preset
imgur.com/ih1KBYZ
With this preset Everything work ok without errors during 2 (!!!) years.
After upgrade
Joomla! 3.7.5
K2 v2.8.0
K2 Article > «Image» tab > «Browse server...» button
choose image
Save article
ERROR MESSAGE
The image was not uploaded. Please ensure that you used a valid image file and that file uploads are properly configured on your server.
imgur.com/ejoCxKY
It make false path
*SITE-ROOT-PATH*/library/images/_krok-pdf.png
In this folder no this image!
Must make this true path
*SITE-ROOT-PATH*/media/library/images/_krok-pdf.png
administrator\components\com_k2\models\item.php
Temporary fix for my preset path =
line 281
//$image = JPATH_SITE.'/'.JPath::clean($existingImage);
$image = JPATH_SITE.'/media/'.JPath::clean($existingImage);
After it fix my site work again without problem
But problem not in line 281.
Problem in input existingImage string by «Browse server...» button.
input string.JPG
Why $existingImage have
library/images/_krok-pdf.png ????
Must be real path from root joomla site =
media/library/images/_krok-pdf.png !!!!!
Please, fix this situation by use true way from non default media preset in this or new version of K2.
WBR,
Igor aka TRUEMAKER
Try add image + save k2 item =
ERROR MESSAGE
The image was not uploaded. Please ensure that you used a valid image file and that file uploads are properly configured on your server.
====================
Image of path preset attached
imgur.com/DqOJuHX
media/library
and K2 preset
imgur.com/ih1KBYZ
With this preset Everything work ok without errors during 2 (!!!) years.
After upgrade
Joomla! 3.7.5
K2 v2.8.0
K2 Article > «Image» tab > «Browse server...» button
choose image
Save article
ERROR MESSAGE
The image was not uploaded. Please ensure that you used a valid image file and that file uploads are properly configured on your server.
imgur.com/ejoCxKY
It make false path
*SITE-ROOT-PATH*/library/images/_krok-pdf.png
In this folder no this image!
Must make this true path
*SITE-ROOT-PATH*/media/library/images/_krok-pdf.png
administrator\components\com_k2\models\item.php
Temporary fix for my preset path =
line 281
//$image = JPATH_SITE.'/'.JPath::clean($existingImage);
$image = JPATH_SITE.'/media/'.JPath::clean($existingImage);
After it fix my site work again without problem
But problem not in line 281.
Problem in input existingImage string by «Browse server...» button.
input string.JPG
Why $existingImage have
library/images/_krok-pdf.png ????
Must be real path from root joomla site =
media/library/images/_krok-pdf.png !!!!!
Please, fix this situation by use true way from non default media preset in this or new version of K2.
WBR,
Igor aka TRUEMAKER
«New projects from idea to result»
Last edit: 7 years 2 months ago by Igor. Reason: sime note edit
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #164105
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Problem with add image from server after upgrade
Hello Igor,
Does this happen with K2's media manager as well?
Does this happen with K2's media manager as well?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Igor
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
7 years 2 months ago #164123
by Igor
«New projects from idea to result»
Replied by Igor on topic Problem with add image from server after upgrade
Hi
I do not used Joomla Media Manager.
I save new images in directory by FTP program.
And this error situation for choose any image from any subfolders in server.
This error (after upgrade) K2 article (choose image from server).
And i have other subdomain with NO errors.
Different = no preset media manager path.
As result = your js take special preset path for choose image from server, but not used preset path for post string in input tag.
I think your js ignore left part of path string to "/" and post wrong path to image.
After it your php return NO IMAGE WARNING, because path is false.
You can make this situation.
Preset non default path in Joomla Media Manager (long with "/").
Save in this way new image by any components.
After it try create new K2 article by use
«Image» tab > «Browse server...» button
You will see not full path string in input tag left of button.
WBR,
Igor
I do not used Joomla Media Manager.
I save new images in directory by FTP program.
And this error situation for choose any image from any subfolders in server.
This error (after upgrade) K2 article (choose image from server).
And i have other subdomain with NO errors.
Different = no preset media manager path.
As result = your js take special preset path for choose image from server, but not used preset path for post string in input tag.
I think your js ignore left part of path string to "/" and post wrong path to image.
After it your php return NO IMAGE WARNING, because path is false.
You can make this situation.
Preset non default path in Joomla Media Manager (long with "/").
Save in this way new image by any components.
After it try create new K2 article by use
«Image» tab > «Browse server...» button
You will see not full path string in input tag left of button.
WBR,
Igor
«New projects from idea to result»
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #164142
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Problem with add image from server after upgrade
Hello Igor,
I will need to investigate this, is this also happening in the extrafields as well?
I will need to investigate this, is this also happening in the extrafields as well?
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Igor
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
7 years 2 months ago #164157
by Igor
«New projects from idea to result»
Replied by Igor on topic Problem with add image from server after upgrade
Hi Krikor,
I did not test it (image from server) in any other K2 function.
And i used extrafields as select list or free text area only.
WBR,
Igor
I did not test it (image from server) in any other K2 function.
And i used extrafields as select list or free text area only.
WBR,
Igor
«New projects from idea to result»
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #164167
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Problem with add image from server after upgrade
I will try to reproduce the issue on all scenarios and I'll let you know.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Igor
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
7 years 2 months ago #164194
by Igor
«New projects from idea to result»
Replied by Igor on topic Problem with add image from server after upgrade
Hi Krikor
I updated Joomla to 3.8.0.
Image add from server selected as before.
Only with my fix (as before)
administrator\components\com_k2\models\item.php
Temporary fix for my preset path =
line 281
This fix need with my preset ONLY!
Image of path preset attached
imgur.com/DqOJuHX
media/library
WBR,
Igor
I updated Joomla to 3.8.0.
Image add from server selected as before.
Only with my fix (as before)
administrator\components\com_k2\models\item.php
Temporary fix for my preset path =
line 281
//$image = JPATH_SITE.'/'.JPath::clean($existingImage);
$image = JPATH_SITE.'/media/'.JPath::clean($existingImage);
This fix need with my preset ONLY!
Image of path preset attached
imgur.com/DqOJuHX
media/library
WBR,
Igor
«New projects from idea to result»
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 2 months ago #164216
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Problem with add image from server after upgrade
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.