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 5848 times

image-manager-content.png

image-manager-content.png (35.11 KiB) Viewed 5848 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.

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 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.

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 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

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 fantastico » Wed Oct 18, 2017 4:44 am

Many thanks Straightlight :)

New member

Posts

Joined
Wed Feb 20, 2013 2:47 am

Post by wendellrt » Fri Dec 08, 2017 11:33 pm

Hi. I tried the fix as suggested by 'StraightLight' below. While that has indeed fixed the 'Invalid Sessions' error, now the Image Manager only shows the first page of images so images on the other pages are not accessible.
Anyone have a fix for this?

Thanks.


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

New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Fri Dec 08, 2017 11:47 pm

Anyone have a fix for this?
No OC version posted.

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 wendellrt » Fri Dec 08, 2017 11:54 pm

Apologies.
OC version 3.0.2.0 (fresh install).

New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Fri Dec 08, 2017 11:56 pm

Have you also applied this solution? https://github.com/opencart/opencart/pu ... 121d8e5774

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 wendellrt » Sat Dec 09, 2017 12:06 am

Yes I have. Please see attached screenshot.
straightlight wrote:
Fri Dec 08, 2017 11:56 pm
Have you also applied this solution? https://github.com/opencart/opencart/pu ... 121d8e5774

Attachments

Screen Shot 2017-12-08 at Fri 8 Dec 16.04.26.png

Screen Shot 2017-12-08 at Fri 8 Dec 16.04.26.png (274.73 KiB) Viewed 5195 times


New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Sat Dec 09, 2017 12:07 am

Did you cleared all caches from your OC admin as well from your browser after making these changes?

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 wendellrt » Sat Dec 09, 2017 12:11 am

straightlight wrote:
Sat Dec 09, 2017 12:07 am
Did you cleared all caches from your OC admin as well from your browser after making these changes?
I cleared the web browser. I don't know how to clear the OC admin.

New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Sat Dec 09, 2017 12:14 am

Admin Dashboard - > Blue square icon on the top right - > Clear both cache
Admin - > Extensions - > Modifications - > Refresh Button.

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 wendellrt » Sat Dec 09, 2017 12:18 am

straightlight wrote:
Sat Dec 09, 2017 12:14 am
Admin Dashboard - > Blue square icon on the top right - > Clear both cache
Admin - > Extensions - > Modifications - > Refresh Button.
Did that. Same result.

New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Sat Dec 09, 2017 12:23 am

Log out from your Opencart admin account. Clear your browser's cache and close the browser. Then, make a backup of your store. Then, from the Github master files, re-upload the admin/view/javascript folder by replacing the previous files automatically from your host file manager console. Then, set the permissions recursively on the javascript folder to 0755. See if that solves the issue when logging back into the Opencart admin.

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 wendellrt » Sat Dec 09, 2017 12:36 am

straightlight wrote:
Sat Dec 09, 2017 12:23 am
Log out from your Opencart admin account. Clear your browser's cache and close the browser. Then, make a backup of your store. Then, from the Github master files, re-upload the admin/view/javascript folder by replacing the previous files automatically from your host file manager console. Then, set the permissions recursively on the javascript folder to 0755. See if that solves the issue when logging back into the Opencart admin.
Sorry. Did that and issue still there.

New member

Posts

Joined
Tue Sep 07, 2010 1:15 pm

Post by straightlight » Sat Dec 09, 2017 12:38 am

Install a fresh version of the master files from Github Opencart on your virtual server and / or on a separate folder and see if you can replicate this issue without any extensions installed.

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
Who is online

Users browsing this forum: No registered users and 78 guests