Jump to content
TEM-Technologie

cannot open 'Modules' any more

Recommended Posts

Hello,

 

something went wrong in my modules section. if i try to open it from the dashboard menu i only get this error message:

 

[PrestaShop] Fatal error in module file :/mnt/webb/c1/23/54021023/htdocs/shop2.tem/classes/module/Module.php(1242) : eval()'d code:

Can't use function return value in write context

 

unfortunately there is no module given, which causes the error, but only the module.php file, that (i assume) just controls the modules.

 

my question is: how do i get rid of this error without deleting all modules in the modules directory until the error does not occur any more?

 

how do i find out which module causes the error, so i can delete that specific module?

 

is it an module error, or is the cause somewhere else, e.g. memory allocation?

 

thanks in advance

tom

Share this post


Link to post
Share on other sites

hello

what is your prestashop version?

everything depends on it

Share this post


Link to post
Share on other sites

file: classes/Module.php

at the end of __construct() function add

 

var_dump($this->name);

 

then try to open modules > modules section

the last module name you will see is a module that have a bug

Share this post


Link to post
Share on other sites

something went wrong in my modules section. if i try to open it from the dashboard menu i only get this error message:

 

 

Parse error: syntax error, unexpected 'use' (T_USE) in /var/www/vhosts/Kynetech.com/httpdocs/classes/module/Module.php(1361) : eval()'d code on line 28

Fatal error: Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found in /var/www/vhosts/Kynetech.com/httpdocs/modules/ps_banner/ps_banner.php on line 30
[PrestaShop] Fatal error in module file :/var/www/vhosts/Kynetech.com/httpdocs/modules/ps_banner/ps_banner.php:
Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found

 

Version Prestashop 1.6.1.6

Share this post


Link to post
Share on other sites

The module ps_banner is from the new PrestaShop v1.7 Classic theme. Did you try to install PrestaShop v1.7 and then roll back? Try deleting all PrestaShop v1.7 modules, as they are incompatible with PrestaShop v1.6.

Share this post


Link to post
Share on other sites

Bonjour,

 

J'ai aujourd'hui le même problème :

[PrestaShop] Fatal error in module file :/home/webethicfo/www/_ps/modules/ps_customtext/ps_customtext.php:
Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found

J'ai voulu installé un module présent dans la liste de ceux proposé dans la section module, il m'est dit qu'il y avait un problème d'installation. J'ai donc essayé de le désinstaller puisqu'il y était noté comme module installé. Là encore j'ai eu un message qui disait qu'il y avait un problème de désinstallation et maintenant il n'est plus possible d'aller sur la gestion des modules avec l'erreur ci-dessus mentionnée.
Dans l'erreur du module il était noté, je crois, qu'il s'agissait de "editorial" mais je ne me rappelle plus du nom exact du module. C'était un module pour ajouter du des blocs de texte.

Que faire ???

Version Prestashop : 1.6.1.5

Merci
Cordialement
Didier.
 

Edited by Didierma (see edit history)

Share this post


Link to post
Share on other sites
The ps_customtext module is a PrestaShop v1.7 module, so it won't work on your PrestaShop v1.6.1.5 installation. You must delete that module and any other modules starting with ps_ until you're using PrestaShop v1.7.

Share this post


Link to post
Share on other sites
post-1265822-0-41376000-1473048947_thumb.pngI was trying to get through an installation of a module, but now i have hit an error. I cant access the modules & services page -

 

[PrestaShop] Fatal error in module file :/home/***/public_html/modules/ps_emailsubscription/ps_emailsubscription.php:

Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found

 

Any 

 

Share this post


Link to post
Share on other sites
That's a PrestaShop v1.7 module. That error message makes me think you're using PrestaShop v1.6 or earlier. If you are using PrestaShop v1.6 or earlier, you can't use that module. If you are using PrestaShop v1.7, make sure all the files are there.

Share this post


Link to post
Share on other sites

Hi everyone,

 

I tried installing a new module and got the same error as being discussed here

"[PrestaShop] Fatal error in module file :/home/kisshoes/public_html/modules/blockreassurance/blockreassurance.php:
Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found"

 

Since I am still using Ps v. 1.6.1.6, I went back to my server and deleted the module I tried to install (Blockreassurance). After I deleted the module, it did not fix the problem. Right now I can't access my module interface, each time I click on the module a white blank page with fatal error notice shows up.

 

Was any body able to fix the problem? Please let me know how you did it.

 

Regards 

Share this post


Link to post
Share on other sites

from where you downloaded the blockreassurance module? isnt it from a github (for ps 1.7) ?

Share this post


Link to post
Share on other sites

I did not download it. I just  found it in my modules cpanel and the button showed install, I clicked on the install and the problem occured

Share this post


Link to post
Share on other sites

Para solucionar los problemas con los modulos de ps_XXXXXXXx hay que entrar por FTP a su Host y eliminar la carpeta la ruta de acceso suele ser public_html/modules y eliminar la carpeta del modulo ps_XXXXX que corresponda. yo lo hice asi y me dejo funcionar la administracion de modulos 

Share this post


Link to post
Share on other sites

Pour résoudre le problème avec l'installation de modules ps_XXXXXXX, vous devez entrer votre dossier hôte FTP et supprimer le ps_wwwww, le chemin est généralement public_html / modules ou httpdocs / modules. Supprimez le dossier qui correspond le module ps_XXXXX. Je l'ai fait et laissez-moi gérer les modules


To solve the problem with the installation of ps_XXXXXXX modules, enter your FTP host folder and delete the ps_wwwww, the path is usually public_html / modules or httpdocs / modules. Delete the folder that corresponds ps_XXXXX module. I did and let me manage modules

Share this post


Link to post
Share on other sites

Thank you iberimport for the info.


 


I have search everywhere in my module and didn't find any file or folder named ps_??????. However, I found this strange folder "/public_html/modules/ecb15e71076765c866bbd778828682cb", I open it and blockreassurance/blockreassurance.php was inside. I deleted the folder still the problem remained.


 


I wonder where else to search for the Ps_XXXXXX


Share this post


Link to post
Share on other sites

I just discovered this is a bug. PrestaShop v1.6 is showing PrestaShop v1.7 modules as available to install. Do not install these modules, since it will cause the fatal error described above.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks guys for your support. I finally was able to see another blockreassurance module I did not delete. So I deleted it and the problem was fixed.

 

Thank you all and nice day to you all

Share this post


Link to post
Share on other sites

Hello this is my error, could you help me?

[PrestaShop] Fatal error in module file :/home/uslac3qm/domains/noigiochiamo.it/public_html/classes/module/Module.php(1361) : eval()'d code:
Can't use function return value in write context

 

In didn't find file in classes/Module.php

Edited by noigiochiamo (see edit history)

Share this post


Link to post
Share on other sites

Je viens d'avoir la même erreur en mettant a jour le module Productscomments.

 

Apparemment il se met a jour en version 1.7 alors que je suis en 1.6.

 

Pour résoudre le problème j'ai supprimé dans modules le dossier productcomments et le dossier bizarre sdf0sf0sdfsf0sd0f qui a été créé pendant la mise à jour. j'ai aussi supprimé le prodcutcomments.zip qui a été créé dans modules.

 

Je peux a nouveau accéder à mes modules  mais du coup impossible de réinstaller productcomments en 1.6...

Prestashop vous avez une solution pour réinstaller ce module sur nos versions 1.6?

Share this post


Link to post
Share on other sites

Je viens d'avoir la même erreur en mettant a jour le module Productscomments.

 

Apparemment il se met a jour en version 1.7 alors que je suis en 1.6.

 

Pour résoudre le problème j'ai supprimé dans modules le dossier productcomments et le dossier bizarre sdf0sf0sdfsf0sd0f qui a été créé pendant la mise à jour. j'ai aussi supprimé le prodcutcomments.zip qui a été créé dans modules.

 

Je peux a nouveau accéder à mes modules  mais du coup impossible de réinstaller productcomments en 1.6...

Prestashop vous avez une solution pour réinstaller ce module sur nos versions 1.6?

 

 

tu as plusieurs solutions

1/ tu as une sauvegarde ftp de ta boutique et tu remets les dossiers manquants (modules/productscomments)

2/ tu installes une version 'test' de prestashop 1.6 sur ton serveur et tu récupères les dossiers manquants

3/ tu les récupères de kk un qui à la même version que toi de prestashop

Share this post


Link to post
Share on other sites

I've got a solution about productcomments module in another post:
 
/home/*********/public_html/modules/productcomments/productcomments.php  line 459 
 
 
Before
if (empty(Configuration::get('PRODUCT_COMMENTS_MODERATE'))){

After

if (!Configuration::get('PRODUCT_COMMENTS_MODERATE')){
 
NOW IT WORKS AGAIN!

Edited by noigiochiamo (see edit history)

Share this post


Link to post
Share on other sites

HI

I'm also getting this when I click on Modules and Services:

 

[PrestaShop] Fatal error in module file :/web/htdocs/www.prematuriamo.it/home/modules/blockreassurance/blockreassurance.php:
Interface 'PrestaShop\PrestaShop\Core\Module\WidgetInterface' not found

 

Any idea on how to activate the Database Cleaner, to get rid of all demo content from my shop, please?

 

Thanks!!

  • Confused 1

Share this post


Link to post
Share on other sites

From that error message, it would appear you're using the blockreassurance module from PrestaShop v1.7 in PrestaShop v1.6, which won't work since it doesn't support widgets. You should delete that module and use the blockreinsurance module from the original PrestaShop v1.6 archive instead.

Share this post


Link to post
Share on other sites

Please help! I cant open Modules in BO, I'm receiving blank screen with error:

[PrestaShop] Fatal error in module Parser:
require_once(): Failed opening required '/var/www/xxxxxx/data/www/xxxxxx/tools/pear_xml_parser//var/www/xxxxxx/data/www/xxxxxxx/tools/pear_xml_parser/Parser/Type.php' (include_path='.:')

 

Prestashop v. 1.6.0.6

Theme default-bootstrap

Version PHP 5.4.45

Share this post


Link to post
Share on other sites

Hi, 

I have the same problem after I have updated my shop to 1.6.1.11

 

[PrestaShop] Fatal error in module file: ***** / classes / module / Module.php (1361): eval () 'd code: 
Can not use function return value in write context

 

I have removed  productcomments forlder but still the same error.

 

Does anyone else have any idea of ​​what I can do?

 

Thanks!

Share this post


Link to post
Share on other sites

using prestashop 1.6.1.11 after the auto 1-click update from 1.4, cannot get into the module tab in admin.....

 

showing:

 

Parse error: syntax error, unexpected '[' in /var/www/html/classes/module/Module.php(1361) : eval()'d code on line 19 Fatal error: Can't use function return value in write context in /var/www/html/classes/module/Module.php(1361) : eval()'d code on line 934 [PrestaShop] Fatal error in module file :/var/www/html/classes/module/Module.php(1361) : eval()'d code:

Can't use function return value in write context

 

 

how should i get over it ? :(

Share this post


Link to post
Share on other sites

Unfortunately, the error message doesn't say which modules is causing the error. You'll have to make a backup of your modules and then delete them one at a time until the error message disappears, then you'll know which module is causing the error.

Share this post


Link to post
Share on other sites

i have a same problem when i click on module and service : [PrestaShop] Fatal error in module file :/home/clients/d445c932dd012d9a02d7211ea2f2f5fb/web/e-commerce/classes/module/Module.php(1361) : eval()'d code:

syntax error, unexpected 'use' (T_USE)

help me please

  • Confused 1

Share this post


Link to post
Share on other sites

I have a same problem when i click on module and service : [PrestaShop] Fatal error in module file :xxxxxxxx/classes/module/Module.php(1361) : eval()'d code:

syntax error, unexpected 'use' (T_USE)

help me please

Edited by Jesus M (see edit history)

Share this post


Link to post
Share on other sites

I've got 1.7 and while open the admin link I've got the following:

ContextErrorException in PrestaShopExtension.php line 49: Notice: Undefined index: prestatrust in PrestaShopExtension.php line 49
at ErrorHandler->handleError('8', 'Undefined index: prestatrust', '/var/www/public_html/pinswear.pl/public_html/src/PrestaShopBundle/DependencyInjection/PrestaShopExtension.php', '49', array('configs' => array(array('addons' => array('api_client' => array('ttl' => '7200'))), array('addons' => array('api_client' => array('ttl' => '300')))), 'container' => object(ContainerBuilder), 'configuration' => object(AddOnsConfiguration), 'config' => array('addons' => array('api_client' => array('ttl' => '300', 'verify_ssl' => '/var/www/public_html/pinswear.pl/public_html/app/cache/dev/cacert.pem'))), 'loader' => object(YamlFileLoader))) in PrestaShopExtension.php line 49
    at PrestaShopExtension->load(array(array('addons' => array('api_client' => array('ttl' => '7200'))), array('addons' => array('api_client' => array('ttl' => '300')))), object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 59
    at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 39
    at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in Compiler.php line 102
    at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 583
    at ContainerBuilder->compile() in bootstrap.php.cache line 2754
    at Kernel->initializeContainer() in bootstrap.php.cache line 2529
    at Kernel->boot() in bootstrap.php.cache line 2560
    at Kernel->handle(object(Request), '1', false) in index.php line 86

 

Anyone can knows how to fix this?

 

Edited by karola (see edit history)

Share this post


Link to post
Share on other sites

Same error when i updated  1.6.0.9 to 1.6.1.18

 

"PrestaShop] Fatal error in module file :/opt/bitnami/apps/prestashop/htdocs/classes/module/Module.php(1363) : eval()'d code: Can't use function return value in write context"

Edited by HaCos (see edit history)

Share this post


Link to post
Share on other sites

Bonjour, j'ai le probleme suivant apres avoir voulu installer un module 1.7 je pense sur une version 1.6. 

des que je veux aller dans l'onglet module j'ai ce message d'erreur .

[PrestaShop] Fatal error in module file :/home/toysavenpt/www/classes/module/Module.php(1361) : eval()'d code:
syntax error, unexpected 'use' (T_USE)

 

Merci de votre aide 

Share this post


Link to post
Share on other sites
On 2015-07-08 at 12:42 PM, vekia said:

file: classes/Module.php

at the end of __construct() function add

 

var_dump($this->name);

 

then try to open modules > modules section

the last module name you will see is a module that have a bug

 

I have tried this method, but after deleting the last module, next time it gives the previous module in the list and so on.. 

 

Any idea how to track the one that gives error? 

 

BTW clearing cache helps opening "modules" once, but clicking on it again gives the same error.

 

Share this post


Link to post
Share on other sites

"You are not authorized to configure a module" error

If click on my modules to configure it I get this error - You are not authorized to configure a module, even though I am logged in as superadmin.

This issue started after I removed my ps-access table and replaced it with a clean ps-access DB as I had problem accessing my orders and stats menu. This action solved the issue I had with orders and stats menu, however, it caused issues to configure my modules. 

The Issues from controller folder admin_access and var folder cache_dev_smarty_compile. In the image below are more details and location of the errors

Please if you have explanations for the issues please do help!

 

Team controll panel line197.JPG

Admin_adminaccess_controller_code.JPG

Team control panel line691.JPG

Var_cache_dev_smarty_compile lines 691_703_711.JPG

Share this post


Link to post
Share on other sites

i get this  error message   [PrestaShop] Fatal error in module file :/home1/showerd7/public_html/classes/module/Module.php(1363) : eval()'d code:
syntax error, unexpected '?'

when i try and click on modules and services on my BO  , i have prestashop version 1.6.1.19  

how can i fix this problem ?

Share this post


Link to post
Share on other sites
Quote

file: classes/module/Module.php

at the end of __construct() function add

 

var_dump($this->name);

 

then try to open modules > modules section

 

And rename the module after the last module listed by FTP

Edited by globals (see edit history)

Share this post


Link to post
Share on other sites

buen día .

al entrar a modulos y servicios me sale el siguiente error..

[PrestaShop] Fatal error in module file :/home/sistem1/public_html/classes/module/Module.php(1361) : eval()'d code:
syntax error, unexpected 'use' (T_USE)

alguien me puede ayudar... ya que necesito configurar el método de pago y tampoco me deja. 

Share this post


Link to post
Share on other sites

Andrea2605

Prestashop version?
Php version on server?

Share this post


Link to post
Share on other sites

Andrea2605 question for you: Think carefully, what is the last installed module on site (did you install new module on Presta?) 
if the ansver is "YES" please write which one?

If your Prestashop 1.6.1.23 is clean istallation and problem with module exist from start, please make one test and change your php settings from 7.2. to 5.6 or lower and then go to modules page on Prestashop. Please write here what is happened, can you reach the modules or not.
 

Share this post


Link to post
Share on other sites

It is possible that some of modules isn't write for use on php 7.2.15 this mean you need to downgrade your php settings.
I had a case with the AfterPay Module. After insttalation Afterpay module Prestashop reported error when I try to reach modules page. After I changed php settings all works well.

Share this post


Link to post
Share on other sites

This mean you need to remove last installed module via ftp
downgrade php settings
try to install same module again.

Share this post


Link to post
Share on other sites
Posted (edited)

Prestashop is an excellent software and after installation all should work properly, unfortunately we made mistakes, we often overlook the necessary settings or conditions.

Edited by katicziv (see edit history)

Share this post


Link to post
Share on other sites

I get the following - 

 

 

>>

>> Fatal error: Can't use function return value in write context in

>> /var/www/html/

>> www.xxx.no/modules/mailchimppro/mailchimppro.php on line 247

>> [PrestaShop] Fatal error in module file :/var/www/html/

>> www.xxx.no/modules/mailchimppro/mailchimppro.php:

>> Can't use function return value in write context

 

 

Anyone?

 

Share this post


Link to post
Share on other sites

Now i get -

 

Notice på linje 1942 i fil /var/www/html/www.xxx.no/classes/controller/AdminController.php
[8] Trying to get property of non-object

Notice på linje 1942 i fil /var/www/html/www.xxx.no/classes/controller/AdminController.php
[8] Trying to get property of non-object

 

Any Ambassadors with some knowledge about this? Seems like the mailchimp module interupt the php in some way. 

Share this post


Link to post
Share on other sites
Posted (edited)

Go to BO (back office) choose ADVANCED PARAMETERS then choose CONFIGURATION INFORMATION

 

2019-04-10_0935

 

Edited by katicziv (see edit history)

Share this post


Link to post
Share on other sites

Not possible. I get the following when i try - 

 

Notice på linje 1942 i fil /var/www/html/www.xxx.no/classes/controller/AdminController.php
[8] Trying to get property of non-object

Share this post


Link to post
Share on other sites

If you can't login to BO and If you have ftp access, go to modules folder and find your mailchimp folder, then rename it.
After this try to log in to BO again
 

2019-04-10_1000

 

Share this post


Link to post
Share on other sites
Posted (edited)

Your website is on PHP 5.3.3
You should try to change to PHP 5.6 and then try to login (before that change back the folder name maichimp)


always clean the browser cache manualy after you made "changes" on site

Edited by katicziv (see edit history)

Share this post


Link to post
Share on other sites
Posted (edited)

Fatal error in module Module.php(1208) : eval()'d :
Can't use function return value in write context

this is the 1208th Line     

Quote

if (eval('if (false){    '.$file.' }') !== false)

 

Help Please

Edited by jinojames
Added a line (see edit history)

Share this post


Link to post
Share on other sites

Hi,

Im a newbi:) Been sitting for 7 hours tring to solve this problem........

Im having 1.6.1.17

When Im clicking at Modul & Service I get this white page with this text........... "[PrestaShop] Fatal error in module file :/customers/1/0/9/autosolaris.se/httpd.www/modules/google-captcha/google-captcha.php:
Uncaught Error: Call to undefined function register_activation_hook() in /customers/1/0/9/autosolaris.se/httpd.www/modules/google-captcha/google-captcha.php:1171 Stack trace: #0 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1129): include_once() #1 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1107): ModuleCore::coreLoadModule('google-captcha') #2 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1841): ModuleCore::getInstanceByName('google-captcha') #3 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1795): ModuleCore::checkModuleFromAddonsApi('google-captcha') #4 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1699): ModuleCore::generateTrustedXml() #5 /customers/1/0/9/autosolaris.se/httpd.www/classes/module/Module.php(1334): ModuleCore::isModuleTrusted('advancedeucompl...') #6 /customers/1/0/9/autosolaris.se/httpd.www/controllers/admin/AdminModulesController.php(1443): ModuleCore::getModulesOnDisk(true, tru"

 

Before I tried to install this captcha-modul so I guess its about that.

Any recomendations?:)

 

Share this post


Link to post
Share on other sites

Go to folder with modules, find captcha folder and remove (delete)
you can do this from ftp connection of file manager from cPanel. After you remove this module try to find compatible module version for your prestashop version.
or change or increase your php settings to new (be sure that your version of prestashop is supporting this php)
https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

  • Thanks 1

Share this post


Link to post
Share on other sites

Big thank you Katicziv!!

Now I will try to find a compatible module version....

Its still strange because i have php 7.1.............

Share this post


Link to post
Share on other sites

Hi, I have the follow problem..."[PrestaShop] Fatal error in module file :/home/pieljove/public_html/classes/module/Module.php(1361) : eval()'d code:
syntax error, unexpected 'use' (T_USE)" I hope you can help me with this isue. Thank you so much

Prestashop version 1.6.1.24

Share this post


Link to post
Share on other sites

Hi.

So we installed a module and after 5 minutes we deleted it. After that, when we tried to go back at module and servirces this message appear :

[PrestaShop] Fatal error in module file :/homepages/12/d690035964/htdocs/classes/module/Module.php(1361) : eval()'d code:
syntax error, unexpected 'use' (T_USE)

 

i dont know how to repare it.... can someone help me please ??

our version of prestshop is 1.6.1.12

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More