Jump to content

Best way to fix my site?


djpat99

Recommended Posts

Hello all, 

My website is severely broken. There has been issues that didn't seem to matter for a long time, but now there are some big issues like not being able to view the modules page, problems with one of the payment methods, not being able to update to version 8 and more. Seems to be PHP errors everywhere.

I have seen other peoples posts with similar issues and tried all suggested fixes that haven't worked for me, or the other peoples posts either. It seems others have just rebuilt their site from scratch. 

Viewing orders, customers, placing orders etc is all working fine. 

So I'm thinking of going nuclear and starting with a fresh install of 1.7x. My worries are keeping the orders, customers, catalogue, blogs etc so my URL's are saved for rankings sake. 

So I wonder, if you were met with such a situation, what do you think is the best way about it?

Could I back up the database, install a fresh Prestashop 1.7x and then upload my old database?

Hoping for any kind of guidance desperately. 

Kind regards

 

  • Like 1
Link to comment
Share on other sites

Posted (edited)

Thank you for your replies. 

So one issue for example, when trying to open the modules folder I get this message:

Oops... looks like an unexpected error occurred.

Attempted to call an undefined method named "loadEnv" of class "Symfony\Component\Dotenv\Dotenv".

[Symfony\Component\Debug\Exception\UndefinedMethodException 0]


And in the server logs, I see: 

Error GET /dan/index.php/improve/modules/manage?_token=bUWXWlH_Ze-2C6zw3gGZom4SXt9afGk_Ey-0ND5cFrQ HTTP/1.1

and

 

AH01071: Got error 'PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/prestablog/class/news.class.php on line 336'


And before I lost access to the Module Manager, I couldn't update any module. 

 

Edited by djpat99 (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi.

Error is caused by the prestablog module, specifically the news.class.php file As written in the statement: Invalid argument supplied for foreach() in /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/prestablog/class/news.class.php on line 336'

Link to comment
Share on other sites

Thank you ps8modules, I get that one. That is just one error I am coming up against. 

I will try renaming that module and see if I can get back onto the module manager page and see if the other modules will update etc. 
 

Quote
6 hours ago, endriu107 said:

What prestashop version you have and what php version you have?

PS version 1.7.7.5 and PHP 7.4.33

 

Link to comment
Share on other sites

Some more error messages:

After renaming the prestablog module causing issues, it shows the following when trying to open Module Manager tab. I saw this one a lot. 

Attempted to call an undefined method named "loadEnv" of class "Symfony\Component\Dotenv\Dotenv".

[Symfony\Component\Debug\Exception\UndefinedMethodException 0]

 

 

and in the server log

Error 500 GET /dan/index.php/improve/modules/manage?_token=zVpgpcBsFiw3sj1nAIAUE1MprcS-6HSwz7KT90y2OHc HTTP/1.1

Link to comment
Share on other sites

40 minutes ago, ps8modules.com said:

Hi.

Your version of Prestashop supports PHP 7.1, 7.2 and 7.3.

It is quite possible that the modules do not support a higher version of PHP than recommended.

Thank you for messaging. 

So I went back to 7.3 then 7.2 and no change but on  7.1 I could get into the module manager page. But when trying to upgrade any module, it came up with a red box saying composer issue and that it needed PHP 7.2 or greater. 

Then lost access to both the front and back office - met with 

This page isn’t working

gamer-tech.co.uk is currently unable to handle this request.

HTTP ERROR 500

 

And looking at logs, the following messages: 

 

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getService() on null in /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/ps_facebook/ps_facebook.php:165\nStack trace:\n#0 /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/ps_facebook/ps_facebook.php(328): Ps_facebook->getService('PrestaShop\\\\Modu...')\n#1 /var/www/vhosts/gamer-tech.co.uk/httpdocs/classes/Hook.php(990): Ps_facebook->hookDisplayHeader(Array)\n#2 /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/ets_superspeed/classes/ext/ets_hook(520): HookCore::coreCallHook(Object(Ps_facebook), 'hookdisplayHead...', Array)\n#3 /var/www/vhosts/gamer-tech.co.uk/httpdocs/modules/ets_superspeed/classes/ext/ets_hook(371): Ets_Hook::callHookOn(Object(Ps_facebook), 'displayHeader', Array)\n#4 /var/www/vhosts/gamer-tech.co.uk/httpdocs/override/classes/Hook.php(28): Ets_Hook::exec17('displayHeader', Array, NULL, false, true, false, NULL, false, Array)\n#5 /var/www/vhosts/gamer-tech.co.uk/httpdocs/classes/controller/FrontController.php(575): Hook::...\n'

 

And

 

 

AH01071: Got error 'PHP message: PHP Fatal error: Class PrestaShopBundle\\Form\\Admin\\Extension\\ModifyAllShopsExtension contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\\Component\\Form\\FormTypeExtensionInterface::getExtendedType) in /var/www/vhosts/gamer-tech.co.uk/httpdocs/src/PrestaShopBundle/Form/Admin/Extension/ModifyAllShopsExtension.php on line 49\n'

 

 

I am going to roll back to my last back up, and then go back to PHP 7.1 so I can at least see things again.

Thank you for your replies and any advise. I have seen some inboxes offering help too. Thank you for reaching out. 

Kind regards
 

Link to comment
Share on other sites

You cannot rename module folders. Modules are only deactivated. Downgrade PHP to 7.3.

Is the prestablog module paid or is it free? You need to find out what the error is, or contact the author of the module.

Be aware that it may take a few minutes for a programmer to fix. Communication and forum advice may not resolve the issue and may take several days to resolve. You also need to realize that we don't see what you see and we can't solve something blindly. Self-interventions can irreversibly damage the entire e-shop.

Edited by ps8modules.com (see edit history)
Link to comment
Share on other sites

Personally, when I see that someone prefers to buy a Prestashop acceleration module, it is clear to me that they will have problems. It is definitely better to pay extra for more powerful hosting than to use tools that will fill your cache and database.

Link to comment
Share on other sites

Do you mean the ets_superspeed app?

I dont use that for the caching etc. I believe I did use it to convert pictures to WebP. We do have a dedicated server too so speed should be ok - it costs a lot anyway! In fact, I don't believe it has even been active since I changed the server a few years ago. 

I do appreciate the replies. Thank you for taking the time. 

 

  • Like 1
Link to comment
Share on other sites

there are several paid modules for migrating you PS catalog, customers etc. to new installation of ps including higher level  of ps release and other platforms.

that is simplest way, we migrate this type of data very often when contacted for hacked shops, this so we don't carry over root hack.

don't use performance modules, none of them work totally, they create issues you can not recreate...

you should post in jobs, get someone to help you that you can trust  and use in future.....

  • Like 1
Link to comment
Share on other sites

4 hours ago, El Patron said:

there are several paid modules for migrating you PS catalog, customers etc. to new installation of ps including higher level  of ps release and other platforms.

that is simplest way, we migrate this type of data very often when contacted for hacked shops, this so we don't carry over root hack.

don't use performance modules, none of them work totally, they create issues you can not recreate...

you should post in jobs, get someone to help you that you can trust  and use in future.....

Thank you for your message. 

I think I have been in touch with you about migration in the past but we were are too small fry for you. 

I have seen modules, and used one to upgrade from 1.6 to 1.7, but I can't even see our Module Manager page now to install a new module or even use or configure old ones unfortunately. 

I will check out the job page you mention and thank you for the tips ref performance modules. 

  • Like 2
Link to comment
Share on other sites

14 hours ago, ps8modules.com said:

I have offered you remote assistance for free. If you used it, you're already in trouble 🤔

Thank you I will be in touch. I appreciate the offer but would of course offer to pay for your time to have a look for me.

  • Like 1
Link to comment
Share on other sites

1 hour ago, djpat99 said:

Thank you for your message. 

I think I have been in touch with you about migration in the past but we were are too small fry for you. 

I have seen modules, and used one to upgrade from 1.6 to 1.7, but I can't even see our Module Manager page now to install a new module or even use or configure old ones unfortunately. 

I will check out the job page you mention and thank you for the tips ref performance modules. 

PS requires a tech knowledge, there are easier platforms.   yfipohS, reverse that.  You should establish relationship with dev who can a accommodate your budget.  Most fail at so it yourself e-commerce because they fail to invest in the business.  Find someone to actually grow your business, those that can take your business to new level.  

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