Post by antares0 » Mon Jul 10, 2023 8:54 pm

Hi there,
this regards Opencard 3.0.xx-Maintenance and the current github pull from https://github.com/opencart/opencart-3

I am currently trying to setup a store, and I am using opencart 3 because my payment plugins are not available for opencart 4 yet. Installation goes through fine, but after logging in into the admin panel, and try to change the store logo or any product image, the image manager doesnt open. I get this instead:
Image

I tried this with a current firefox esr build, chrome on linux, chrome on windows. When clicking onto the image to replace it, there is no network traffic(apache2 server log is not showing any activity, firefox http live headers doesnt record anything). There are no errors in developer console of firefox(F12)

Is there anything I can do to get the image manager working? Btw, this picture was taken with german language addon installed, however i get the same result on a naked fresh install.

Newbie

Posts

Joined
Mon Jul 10, 2023 8:45 pm

Post by straightlight » Mon Jul 10, 2023 10:30 pm

Please create an issue case in the opencart-3 repository. This addressed issue may need to be looked at.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Tue Jul 11, 2023 12:04 am

Yes, I can confirm this issue for the 3.0.x.x_Maintenance, too. I am now looking into it. Perhaps an issue with the newer jquery?

Update: Tried all the jquery versions and PHP versions, no change. Maybe the issue is caused by bootstrap 3.4.1?
Last edited by JNeuhoff on Tue Jul 11, 2023 12:35 am, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Tue Jul 11, 2023 12:23 am

Mine isn't updated, yet. Reporting user mentioned both packages on the first post.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Tue Jul 11, 2023 12:41 am

straightlight wrote:
Tue Jul 11, 2023 12:23 am
Mine isn't updated, yet. Reporting user mentioned both packages on the first post.
Hmm, that's strange. opencart-3 uses bootstrap 3.3.1, 3.0.x.x_Maintenance uses bootstrap 3.4.1, but both of them have this issue.
Something else must cause this issue. Have to investigate. Let me know if you find the cause of it.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Tue Jul 11, 2023 1:01 am

It might have something to do with the bootstrap sanitizer. The solution as suggested on this forum thread seems to solve this issue for 3.0.x.x_Maintenance which uses bootstrap 3.4.1.

To straightlight: Can you also try it on opencart-3 and let us know what you get?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Tue Jul 11, 2023 1:20 am

JNeuhoff wrote:
Tue Jul 11, 2023 1:01 am
It might have something to do with the bootstrap sanitizer. The solution as suggested on this forum thread seems to solve this issue for 3.0.x.x_Maintenance which uses bootstrap 3.4.1.

To straightlight: Can you also try it on opencart-3 and let us know what you get?
Please provide the pull request URL from the maintenance branch that shows the change of bootstrap 3.4.1 with sanitize: false. I'll take a look at it.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Tue Jul 11, 2023 1:50 am

straightlight wrote:
Tue Jul 11, 2023 1:20 am
JNeuhoff wrote:
Tue Jul 11, 2023 1:01 am
It might have something to do with the bootstrap sanitizer. The solution as suggested on this forum thread seems to solve this issue for 3.0.x.x_Maintenance which uses bootstrap 3.4.1.

To straightlight: Can you also try it on opencart-3 and let us know what you get?
Please provide the pull request URL from the maintenance branch that shows the change of bootstrap 3.4.1 with sanitize: false. I'll take a look at it.
The only pull request in the 3.0.x.x_Maintenance branch for this issue is this one: https://github.com/opencart/opencart/co ... ca88b1c287

See also this: https://github.com/opencart/opencart-3/issues/188

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Tue Jul 11, 2023 2:18 am

JNeuhoff wrote:
Tue Jul 11, 2023 1:50 am
straightlight wrote:
Tue Jul 11, 2023 1:20 am
JNeuhoff wrote:
Tue Jul 11, 2023 1:01 am
It might have something to do with the bootstrap sanitizer. The solution as suggested on this forum thread seems to solve this issue for 3.0.x.x_Maintenance which uses bootstrap 3.4.1.

To straightlight: Can you also try it on opencart-3 and let us know what you get?
Please provide the pull request URL from the maintenance branch that shows the change of bootstrap 3.4.1 with sanitize: false. I'll take a look at it.
The only pull request in the 3.0.x.x_Maintenance branch for this issue is this one: https://github.com/opencart/opencart/co ... ca88b1c287

See also this: https://github.com/opencart/opencart-3/issues/188
The reason why we're seeing this code is because you just committed to it less than an hour ago.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Tue Jul 11, 2023 5:53 pm

@straightlight: Actually, I just tested the current opencart-3, and it works fine there, without the bugfix as suggested on this forum thread.

This makes me think the issue was caused after the upgrade from bootstrap 3.3.1 to 3.4.1 in the 3.0.x.x_Maintenance branch. Anyway, for the latter I added the

Code: Select all

santize: false,
to the admin/view/javascript/common.js, to make it work there for bootstrap 3.4.1, too.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by antares0 » Tue Jul 11, 2023 7:55 pm

I can confirm that after making said change to /admin/view/javascript/common.js the image manager works. Thank you all!

Newbie

Posts

Joined
Mon Jul 10, 2023 8:45 pm

Post by ADD Creative » Tue Jul 11, 2023 8:22 pm

JNeuhoff wrote:
Tue Jul 11, 2023 5:53 pm
This makes me think the issue was caused after the upgrade from bootstrap 3.3.1 to 3.4.1 in the 3.0.x.x_Maintenance branch.
The sanitize option was only added in 3.4.1 to fix an XSS vulnerability. Before 3.4.1 no sanitization was done, so there was no need to disable it.

https://blog.getbootstrap.com/2019/02/1 ... and-3-4-1/

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Tue Jul 11, 2023 9:11 pm

antares0 wrote:
Tue Jul 11, 2023 7:55 pm
I can confirm that after making said change to /admin/view/javascript/common.js the image manager works. Thank you all!
Glad to hear that this has fixed it for you.

Please add '[SOLVED]' to the beginning of this original forum thread title.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Tue Jul 11, 2023 11:47 pm

JNeuhoff wrote:
Tue Jul 11, 2023 5:53 pm
@straightlight: Actually, I just tested the current opencart-3, and it works fine there, without the bugfix as suggested on this forum thread.

This makes me think the issue was caused after the upgrade from bootstrap 3.3.1 to 3.4.1 in the 3.0.x.x_Maintenance branch. Anyway, for the latter I added the

Code: Select all

santize: false,
to the admin/view/javascript/common.js, to make it work there for bootstrap 3.4.1, too.
By doing that, extension theme developer that will depend on content-x won't be able to propagate it.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Wed Jul 12, 2023 5:05 am

straightlight wrote:
Tue Jul 11, 2023 11:47 pm
By doing that, extension theme developer that will depend on content-x won't be able to propagate it.
This is for the admin backend, and only for the bootstrap popover function, it shouldn't affect the frontend theme. If you know a better solution let me know.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by antares0 » Wed Jul 12, 2023 5:20 pm

actually, before marking this as solved, while the basic functionality of the image manager now works, trying to create a directory still gives the same trouble(i.e. no dialog popping up). I havent figured out where to change the code for this, but since i can manually create and upload directories/images and only need the picker to select them, this is a lower end issue as far as i am concerned - I still believe it should be brought up

Newbie

Posts

Joined
Mon Jul 10, 2023 8:45 pm

Post by straightlight » Wed Jul 12, 2023 5:24 pm

antares0 wrote:
Wed Jul 12, 2023 5:20 pm
actually, before marking this as solved, while the basic functionality of the image manager now works, trying to create a directory still gives the same trouble(i.e. no dialog popping up). I havent figured out where to change the code for this, but since i can manually create and upload directories/images and only need the picker to select them, this is a lower end issue as far as i am concerned - I still believe it should be brought up
Thanks for bringing this up. There are still internal codes from bootstrap that uses its own resource to load the required features and adding a switch case as a compatible solution can still leave some leftover issues. This limitation has been going on for many years and hope to find a workaround for this eventually.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Thu Jul 13, 2023 6:51 pm

antares0 wrote:
Wed Jul 12, 2023 5:20 pm
actually, before marking this as solved, while the basic functionality of the image manager now works, trying to create a directory still gives the same trouble(i.e. no dialog popping up). I havent figured out where to change the code for this, but since i can manually create and upload directories/images and only need the picker to select them, this is a lower end issue as far as i am concerned - I still believe it should be brought up
Thanks for pointing it out. I have now uploaded the same popover bugfix for the admin/common/filemanager.twig. Creating a directory should now work again.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 5 guests