Jump to content

Error 500 in multishop mode when trying to change logo


Recommended Posts

Hi

I recreated under PS9 an already existing shop under PS8 - this is a multishop mode one. I created exactly same shops in the same order, they have the same ID and group ID (I even checked in PhMyAdmin) in the new PS9 one than in the older PS8 one.

When I try to adapt the classic theme in shops :

- I can change the theme of each shop for child-theme I ve already set

- BUT I cannot change logos of shops --> this gives an error 500 each time (the logo is correctly loaded in /img/logo-xxxx.jpg but the admin panel break to 500 error). I tried to clear and remove all caches, the same.

The Debug mode throws :

"Shop group id 0 is invalid. Shop group id must be a number that is greater than zero."

And in details :

ShopException

PrestaShop\PrestaShop\Core\Domain\Shop\Exception\
In /home/ferwtxap/public_html/src/Core/Domain/Shop/ValueObject/ShopGroupId.php:68

 * @throws ShopException
     */
    private function assertIsGreaterThanZero(int $shopGroupId): void
    {
        if (0 >= $shopGroupId) {
            throw new ShopException(
                sprintf(
                    'Shop group id %s is invalid. Shop group id must be a number that is greater than zero.',
                    var_export($shopGroupId, true)
                )
            );

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

I just have this problem, I activated multishops, tried to change the logo for the second shop and I had this error.
What corrections did you do in ps-configuration, because I'm blocked !

Thanks and regards
Larentia

 

Link to comment
Share on other sites

  • 4 weeks later...

@

On 7/22/2025 at 5:10 PM, Antoine Gaudin said:

Solved this by editing logo settings directly in ps_configuration.

But the bug remains.

how do you solved that? i'm new to prestashop, could someone explain what to do?

 

Edited by lblabr (see edit history)
Link to comment
Share on other sites

Hello,

I had the bug when I added a logo to my second shop. And the debug mode was automatically activated.

So I went to the root folder via the FTP client and located the configuration file (config/defines.inc.php). I edited this file and replaced the value 'define('PS_MODE_DEV', true);' with 'define('PS_MODE_DEV', false);'

I deleted the cache.

After this, I was in normal mode, the logo appeared on my second shop and I was able to manage the email and invoice logos for the second shop. Everything is ok.

 

Link to comment
Share on other sites

To edit the logo settings directly via the database, access phpMyAdmin (or another SQL client) and open the ps_configuration table.
Run the following query:

SELECT * FROM `ps_configuration` WHERE `name` LIKE 'PS_LOGO';


This will display the logos currently configured for each shop.
To add a logo for a new shop, simply insert a new record into the table, following the same syntax as the existing entries and adjusting the values to match the new shop ID.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...