Post by JimDrew » Wed Jun 15, 2022 10:21 am

EDIT: For those that don't want to scroll to the end of this thread - the fix to this problem is to just install from the latest Github release. Firefox browser may require clearing the caches.

So, I tried to update a test site that was OC3.0.2.0 to OC4.0.0.0 and that was a massive failure. So, I decided to make a clean installation of OC4.0.0.0, downloaded from the github (06/14/2022). I created a new database, went to the site which invokes the installer (everything was checked), and did the installation. I deleted the INSTALL folder and then went to the site.... works perfectly. Then I decided to go to the admin page, entered my credentials, and I get no response at all... no error message, nothing. I have the correct username/password (its the same one I have used forever, saved in the browser). I tried entering garbage and I also do not get an error message on screen, or in a log anywhere. So, I decided to click on the "forgotten password" link and I get an Opencart generated page that says "Page not found" with this error at the very top of the display:

Warning: Undefined array key "user_token" in /homepages/xx/xxxxxxxxxx/htdocs/dev.test.com/admin/controller/error/not_found.php on line 13Warning: Undefined array key "user_token" in /homepages/xx/xxxxxxxxxx/htdocs/dev.test.com/admin/controller/error/not_found.php on line 18

I am hosting this on IONOS, using PHP Version 8.1.6. In the PHP.ini file I have: display_errors = 1 and error_reporting = E_ALL lines uncommented, so I would expect to be getting some type of error log but I don't see anything anywhere (like I normally would with OC3.x).

At this point I can't get into the admin page, but the main website all works as expected. Any ideas?
Last edited by JimDrew on Thu Jun 23, 2022 7:23 am, edited 1 time in total.

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by xxvirusxx » Wed Jun 15, 2022 2:51 pm

JimDrew wrote:
Wed Jun 15, 2022 10:21 am
So, I tried to update a test site that was OC3.0.2.0 to OC4.0.0.0
If that upgrade is not for testing purpose, then better don't make upgrade yet.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by JimDrew » Wed Jun 15, 2022 10:37 pm

Of course the plan is to upgrade existing OC3.0.2.0 sites that I control. I am just doing testing until I see it all work correctly. The upgrade yielded a ton of errors, which I just figured were due to the numerous patches made over the last few years. This is why I started with a brand new clean installation and database. Like I said, the website itself seems to work fine - everything works just like you would expect. I just can't get into the admin page. I don't get the normal "login error" message that you see with OC3.0.2.0 when you enter the wrong credentials, no matter what data I put there, and trying to reset the password gives me the error shown above.

One thing that is quite different with OC4 vs. OC3 installation is the permissions. With OC3.x you had to set permissions for several directories and files, whereas with OC4 the installation instructions state that you only need to make the config files as 777. Is this a mistake?

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by straightlight » Thu Jun 16, 2022 2:44 am

JimDrew wrote:
Wed Jun 15, 2022 10:37 pm
Of course the plan is to upgrade existing OC3.0.2.0 sites that I control. I am just doing testing until I see it all work correctly. The upgrade yielded a ton of errors, which I just figured were due to the numerous patches made over the last few years. This is why I started with a brand new clean installation and database. Like I said, the website itself seems to work fine - everything works just like you would expect. I just can't get into the admin page. I don't get the normal "login error" message that you see with OC3.0.2.0 when you enter the wrong credentials, no matter what data I put there, and trying to reset the password gives me the error shown above.

One thing that is quite different with OC4 vs. OC3 installation is the permissions. With OC3.x you had to set permissions for several directories and files, whereas with OC4 the installation instructions state that you only need to make the config files as 777. Is this a mistake?
I would suggest the use of opencart-3 from the Github Opencart repository prior to upgrade to OC 4 in order to let time for OC 4 to evolve: https://www.github.com/opencart/opencart-3 .

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 JimDrew » Thu Jun 16, 2022 3:14 am

Thanks... I am already using OC3.x successfully with several sites. The reason I want to move to OC4 is that IONOS is terminating PHP below 8.0 at the end of this year, and I am already having to pay for PHP5.6 support for an old eCommerce Templates site (that I want to replace ASAP). I am trying to avoid having to pay to keep the old PHP's in place, so I want to move to OC4. I realize that there could be some growing pains, especially when it comes to OCMOD vs. VQMOD (which I have never used) vs. EVENTS (which I have no clue what they really do). The general description of changes in OC4 is pretty lacking so far, and I am sure that it is because the developer(s) are just too close to their work to write documentation and so it omits some things that are just "assumed" that people know because of the previous versions.

I did another full install from scratch today with the exact same results. I don't think it's something I am doing. I am really wondering about the permissions thing. If whoever is in charge of debugging OC4 wants to take a look around the server I can provide SFTP access.

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by EvolveWebHosting » Sat Jun 18, 2022 5:04 am

JimDrew wrote:
Wed Jun 15, 2022 10:37 pm

One thing that is quite different with OC4 vs. OC3 installation is the permissions. With OC3.x you had to set permissions for several directories and files, whereas with OC4 the installation instructions state that you only need to make the config files as 777. Is this a mistake?
Don't leave those files set to 777 on your server. Just in case: The permission 777 means that any user on your operating system can modify, execute, and write to the files posing a significant security risk to your system. An unauthorized user could use this to modify files to compromise your system

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by JimDrew » Sun Jun 19, 2022 2:48 am

Yes, I am aware of this fact. I was just using 777 in testing.

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by rgbworld » Mon Jun 20, 2022 8:17 am

JimDrew wrote:
Wed Jun 15, 2022 10:21 am
So, I tried to update a test site that was OC3.0.2.0 to OC4.0.0.0 and that was a massive failure. So, I decided to make a clean installation of OC4.0.0.0, downloaded from the github (06/14/2022). I created a new database, went to the site which invokes the installer (everything was checked), and did the installation. I deleted the INSTALL folder and then went to the site.... works perfectly. Then I decided to go to the admin page, entered my credentials, and I get no response at all... no error message, nothing. I have the correct username/password (its the same one I have used forever, saved in the browser). I tried entering garbage and I also do not get an error message on screen, or in a log anywhere. So, I decided to click on the "forgotten password" link and I get an Opencart generated page that says "Page not found" with this error at the very top of the display:

Warning: Undefined array key "user_token" in /homepages/xx/xxxxxxxxxx/htdocs/dev.test.com/admin/controller/error/not_found.php on line 13Warning: Undefined array key "user_token" in /homepages/xx/xxxxxxxxxx/htdocs/dev.test.com/admin/controller/error/not_found.php on line 18

I am hosting this on IONOS, using PHP Version 8.1.6. In the PHP.ini file I have: display_errors = 1 and error_reporting = E_ALL lines uncommented, so I would expect to be getting some type of error log but I don't see anything anywhere (like I normally would with OC3.x).

At this point I can't get into the admin page, but the main website all works as expected. Any ideas?
I have had exactly the same experience... attempted an upgrade from 3.0.2.0 to OC4.0.0.0 which kind of worked after patching the installer files, manually installing missing default OpenCart extensions, and fumbling with the Admin folder rename and 'storage` folder configuration. In my case I was unable to checkout with a subscription product, and User control panel pages don't display.

I decided to try a Clean, Fresh install of OC4.0.0.0 on a staging server. The install went well, but I cannot login to Admin. I have the exact same experience and errors as listed by the OP.

Instead of suggesting that we install v 3.x, would it be possible for someone to offer suggestions on how we can log into the Admin panel on version 4.0.0.0?

Thanks

RGB World - FREE and Commercial Extensions
For custom work or support, please use our Contact Form or visit our Support Forum.

Favorite Quote: There are 10 types of people in the world. Those who understand binary and those who don't. 8)


User avatar
New member

Posts

Joined
Wed Aug 08, 2012 6:11 am

Post by by mona » Mon Jun 20, 2022 9:20 am

OC4 is not suitable for live sites. It is being tested, do not expect any other answer any time soon except the one that is being provided. It is not suitable for production only for testing.

In the same vain, one might suggest instead of asking for a solution to be provided, one might come back with a fix. Nevertheless, there are more issues than just this and it would be helpful if you provided your complete set up as I personally have a feeling that there might be additional cross browser issues (and I might be wrong).

Have you searched the forum for all the comments posted and tried them all out yet?
This for example viewtopic.php?t=228495&p=843586

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by rgbworld » Mon Jun 20, 2022 11:55 am

Thanks for the reply. It is perfectly clear that OC 4.0.0.0 should not be installed on a production server and that there are currently many issues that need to be resolved - as is the case with any major version upgrade. As stated, a semi-successful "upgrade" was performed, but there were a lot of other issues, so I decided to try a fresh install in order to determine if the same issues existed with a fresh install.

Regarding the inability to login to the Admin area, I will post a solution if I can discover the problem. I made several unsuccessful attempts to resolve the login issue. I'll file a bug report, here are the details:

**What version of OpenCart are you reporting this for?**
OpenCart: 4.0.0.0
SHA: 2c10247de9af4c97484623f596d759e42704d848

**Describe the bug**
After performing a fresh install with new empty database, I am unable to login to the Admin area. The storefront appears and is functioning as expected.

What section does it affect?
Admin Login

**To Reproduce**
Steps to reproduce the behavior:
1. Install OpenCart 4.0.0.0 (2c10247de9af4c97484623f596d759e42704d848)
2. After successful install click the link to go to the Admin panel
3. The login screen is presented
4. Enter Login credentials and press Login button
5. Nothing happens.

**Expected behavior**
I expect that after entering Admin login credentials and pressing the Login button that I should be taken to the Admin panel.

**Server / Test environment:**
- Deployed to a STAGING server. Behind an .htaccess protected site allowing only my ip.
- Operating system: AlmaLinux v8.6.0
- PHP version: 8.1
- DB: 10.5.16-MariaDB
- Browser(s) tested: macOS FireFox 99.0.1 and Chrome 100.0.4896.75

**Additional context**
The issue may be javascript related because pressing the Login button without entering ANY credentials, simply does nothing. There is no error or warning to complete the input fields when they are left empty. When entering valid credentials, the Login button temporarily displays spinner, then nothing. There are no error logs anywhere that I can find.

As an attempt to login, I press the "Forgotten" password link on the login page. The result is an Opencart generated page that says "Page not found" with this error at the very top of the display:

Warning: Undefined array key "user_token" in /admin/controller/error/not_found.php on line 13Warning: Undefined array key "user_token" in /admin/controller/error/not_found.php on line 18

I have since installed latest master: 13697b4b066aeaba81281ff2a316999e6af14aac
Same issue exists with Login button not logging into Admin
New Error on forgotten password page: Could not call registry key model_user_user! in /system/engine/controller.php on line 25

I see that there is another commit to the master branch that addresses "unfinished" 2FA, so it may be that I am now running a half-finished enhancement. I will keep installing updates in effort to establish a semi-stable version with admin access.

My javascript skills are not great, but I have been looking through common.js in effort to locate the problem. Any suggestions are appreciated.

Thank you

RGB World - FREE and Commercial Extensions
For custom work or support, please use our Contact Form or visit our Support Forum.

Favorite Quote: There are 10 types of people in the world. Those who understand binary and those who don't. 8)


User avatar
New member

Posts

Joined
Wed Aug 08, 2012 6:11 am

Post by JimDrew » Mon Jun 20, 2022 3:11 pm

One would think that since MANY others are reporting problems on the Admin side that you CAN in fact log into the Admin page! I can not, and neither can person in the last posting (rgbworld). We are using two different hosts, and I am using a SQL 5.7 database and PHP 8.1.6 - those seem to be the only differences in our setups.

I would like to know how people are actually able to get into the Admin page... we can't. I realize that OC4.0.0.0 is in testing, but we can't test anything if we can't log into the Admin page! :)

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by xxvirusxx » Mon Jun 20, 2022 3:26 pm

Admin work just fine with latest github version.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by EvolveWebHosting » Mon Jun 20, 2022 11:34 pm

xxvirusxx wrote:
Mon Jun 20, 2022 3:26 pm
Admin work just fine with latest github version.
It is crazy that users have to know that there is such a difference on Github vs. the download from opencart.com in order to get a version that works for them

Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhosting.com


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by JimDrew » Tue Jun 21, 2022 8:00 am

I have always been using the Github versions, and none of them have worked for me. I will see if something has changed in the last couple of days.

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by JimDrew » Tue Jun 21, 2022 1:58 pm

I downloaded the latest Github version, which at the time had changes that were just 7 hours old. I made another clean installation and this clicking on the "Forgotten Password" just reloads the page, and entering the correct credentials pops up some sort of console (javascript?) with my Firefox browser with a message that says:

redirect "https://www.XXXXX.com/admin/index.php?r ... e6464e5be6"

If I try to access the admin page from either Microsoft Edge or Google Chrome, then I do in fact get the Admin page! WHY would Firefox not work? That is the browser that I use, as do millions of people.

I will have to recommend to the developers that they should make the option to move the storage to some other location an option and not a requirement. We should be able to place (or rename, which is what I do) the storage folder where ever we like.

New member

Posts

Joined
Wed Nov 21, 2018 1:08 am

Post by rgbworld » Wed Jun 22, 2022 10:50 am

Installing the latest version from github repo commit #da4554fad22fbb0340d8b49ab0e45aee42dd7c02 fixed the admin login for me.

As I suspected, the previous commit that I had installed was unfinished. There are already newer commits, so it is important for anyone testing (myself included) to realize that there could be an occasional commit that breaks something. I would suggest installing the latest commit and if something is broken, wait a day or 2 to see if there are other commits related to a particular issue. The code base is being updated frequently, so it is currently a moving target.

Have fun, OC 4 is getting better every day!

RGB World - FREE and Commercial Extensions
For custom work or support, please use our Contact Form or visit our Support Forum.

Favorite Quote: There are 10 types of people in the world. Those who understand binary and those who don't. 8)


User avatar
New member

Posts

Joined
Wed Aug 08, 2012 6:11 am

Post by xxvirusxx » Wed Jun 22, 2022 8:32 pm

rgbworld wrote:
Wed Jun 22, 2022 10:50 am
OC 4 is getting better every day!
:laugh: :laugh:

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: No registered users and 3 guests