Post by Digibits » Tue Sep 12, 2017 7:56 am

*Note: Previously posted in the wrong forum by accident so moving to correct version forum

Setup:
- Fresh install of OC 3.0.2.0
- Development docker container with php 7.0.19
- SSL & SEO URLs are OFF
- On first access to the admin, i was notified to move the storage dir out of the web root, so i selected the automatic option and it completed with success.


ISSUE:
Anywhere in the admin where I am supposed to be able to edit an image say my profile, or image for an product option etc, I get a login modal with the message : Invalid token session. Please login again.
When you login again, you get the content of the image selection modal but refreshed as a page so there is no admin site, css, js etc.. just the content of the modal.

Any Ideas?

Here is the AJAX url that is being called and returns the login modal:

Code: Select all

http://localhost:8087/admin/index.php?route=common/filemanager&token=&target=input-image0&thumb=thumb-image0
Looks like the token is not being passed to the url.. why would that be?

Attachments

login-token.png

login-token.png (47.22 KiB) Viewed 569 times

image-manager-content.png

image-manager-content.png (35.11 KiB) Viewed 569 times


Newbie

Posts

Joined
Sun Jun 04, 2017 11:23 am

Post by Iamdbat » Tue Sep 26, 2017 11:10 pm

I have exactly the same problem

Active Member

Posts

Joined
Sat Jan 28, 2012 7:32 am

Post by straightlight » Thu Sep 28, 2017 6:53 am

Opencart 3.0.2.0 does not contain any defined token key in the URL but rather a new one called: user_token . If this error comes from an AJAX call which a token does not return, there are two possibilities:

1 - You are not using Opencart 3.0.2.0 .
2 - You are using Opencart 3.0.2.0 but using an installed extension using the old defined token key which the file manager controller is no longer defined with.

Either in your installed XML contribution file or from the previous original admin/view/template/common/filemanager.twig file you might have to,

find all instances of:

Code: Select all

&token
replace, each, with:

Code: Select all

&user_token
This should resolved the problem.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member
Online

Posts

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

Post by fantastico » Tue Oct 17, 2017 10:18 pm

I can confirm i get this issue too on a fresh install 3.0.2.0

Thank you straightlight for your suggestion but it did not help as all instances of token in filemanager.twig are user_token already.

New member

Posts

Joined
Wed Feb 20, 2013 2:47 am

Post by straightlight » Tue Oct 17, 2017 10:46 pm

Some modifications were done on Github regarding the admin file manager lately at this location:

- Controller: https://github.com/opencart/opencart/bl ... anager.php
- Twig: https://github.com/opencart/opencart/bl ... nager.twig

Download them and upload them each accordingly to your admin folder, clear all caches and see if that resolves the issue.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member
Online

Posts

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

Post by fantastico » Wed Oct 18, 2017 2:42 am

Thank you Straightlight, that worked great.

Only issue i can see is that when trying to add a new folder in the image manager the "Warning: Directory does not exist!" popup comes up and the new folder is not created.

New member

Posts

Joined
Wed Feb 20, 2013 2:47 am

Post by straightlight » Wed Oct 18, 2017 3:19 am

This subject has been covered on this topic: https://github.com/opencart/opencart/issues/6108

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member
Online

Posts

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

Post by fantastico » Wed Oct 18, 2017 4:44 am

Many thanks Straightlight :)

New member

Posts

Joined
Wed Feb 20, 2013 2:47 am
Who is online

Users browsing this forum: No registered users and 6 guests