Minishop2 for 3.0.4?

Hello dear MODX community.
I am still quite new to MODX…
I am currently facing the following problem: I had to upgrade my website because version 2.8.1 is not compatible with PHP 8.x. Here’s what happened:
I updated my MODX site from 2.8.1 to 3.0.4. Everything went quite well so far. However, now my Minishop2 Extra is no longer working. All resources/products have disappeared, and Minishop2 cannot be updated from the manager either.
I am getting desperate :smiley:

MiniShop2 is not compatible with MODX 3.

I know they are working on MiniShop3 for MODX 3 but I don’t know what the current state is.

There are some articles online (in russian). So maybe take a look at them (with Google translate if necessary):


For the time being, it’s maybe better to stay with MODX 2.x if you are using Minishop.
The current MODX version 2.8.6 should support PHP 8.

Hey Harry, thank you very much for the quick response.
That’s unfortunately disappointing. I’ll have to see how I can best do this retrospectively…

Should I restore a backup and then update from there to 2.8.6?

Yes, I would do that.
(There is no way to downgrade back to MODX 2.x from MODX 3.)

So, I have now restored the backup, and updated from 2.8.1 to 2.8.6. After that, I set the PHP version to 8.0… Now, despite the 2.8.6 update, I am getting an ERROR 500.
Somehow the 2.8.6 version doesn’t seem to be compatible with PHP 8.0 after all…

Edit: The backend is still accessible…

The problem won’t be the MODX core.
It’s probably one of the installed extras that is not compatible with PHP 8.

Locate the server error log and take a look at the error message (that should get logged when a 500 error occurs).

I have now updated all extras to the latest version, except for PDFResource. This extra only caused problems during my last attempt… All pre-set data was lost and my PDFs were undefined and empty… I also can’t exactly tell if that extra is responsible for the 500 error…

I just noticed that several errors are being shown with ModRestClient… what does that mean?

/htdocs/modx/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

/htdocs/modx/core/xpdo/xpdo.class.php : 1235) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

These are only deprecation warnings. The code still works (in MODX 2.x). “modRestClient” got removed in MODX 3.

Check the server error log for an error message.
(This is a different file than the error log file in MODX. The exact path/location depends on the server configuration.)

I can imagine where the error comes from. I just set the server to PHP 8.0. What exactly doesn’t work with the PHP version is unclear to me. I’ll check again to see if I can find the PHP error logs

I now have these errors in the PHP Errors:

[29-Nov-2023 14:59:26 Europe/Berlin] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /htdocs/modx/core/cache/includes/elements/modplugin/5.include.cache.php on line 21
[29-Nov-2023 14:59:26 Europe/Berlin] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /htdocs/modx/core/cache/includes/elements/modplugin/5.include.cache.php on line 21

But I actually completely emptied the cache folder…

If I set the PHP version to 7.4, then everything works again.

Can you tell, from the Manager, what plugin #5 is in the Elements tree?

In this example, the ImagePlus plugin is #10:

image

1 Like

Hey Dejaya,
The extra with the id 5 is Anti-Spam Email…

image

1 Like

Take a look at this post:

2 Likes

WOW! I would have never thought of that. That’s amazing! Thank you guys so much!

1 Like

Hello again…
So far everything had worked. However, saving a resource - / product with Minishop2 no longer works. When I click “Save” after a change or creation of a resource, the loading bar loads indefinitely, and the changes are not applied.
Does anyone have an idea what it could be?

[2023-11-30 08:29:01] (ERROR @/htdocs/modx/core/components/minishop2/handlers/storage/session/cartsessionhandler.class.php : 15) PHP warning: Trying to access array offset on value of type null
[2023-11-30 08:29:01] (ERROR @ /htdocs/modx/core/components/minishop2/handlers/storage/session/ordersessionhandler.class.php : 22) PHP warning: Undefined array key "minishop2"

Open the developer tools in the browser and go to the “Network” tab.
Then click the “Save” button.
A new request should be created.
What is the response of this request? What’s the HTTP response code? (500?)

Hey, I have checked it and received the following response:

As it’s a 500 Server Error, there is probably a corresponding error message in the server error log.