Jump to content

[PrestaShop] Fatal error in module install-1.3.2:


Recommended Posts

Hi, 

I tried to build new shop on new PS1.6.0.5 and got in trouble now. When I tryed update native modules today I got this error 

[PrestaShop] Fatal error in module install-1.3.2:
Call to undefined method Tools::recurseCopy()

There was 3 modules to update I start with Home text editor and got this error.

 

It is on page 

index.php?controller=AdminModules&token=c279b0a2f1620352d1f9287993ac56a3

All other pages in Admin works fine. 

 

Any idea please?

 

 

 

 

 

 

Link to comment
Share on other sites

I had the same issue with the homeslider module update. It was also preventing me from accessing the Modules panel in admin.

 

I used sftp to replace the updated homeslider module files with older files. That eliminated the error.

  • Like 1
Link to comment
Share on other sites

I had the same issue with the homeslider module update. It was also preventing me from accessing the Modules panel in admin.

 

I used sftp to replace the updated homeslider module files with older files. That eliminated the error.

I can confirm that renameing the homeslider module fixed the issue or deleteing it or OVERWRITE with the original one from prestashop pack.

 

10x

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

Got the same issue myself just now. 

 

I just commented out the line causing the error

 

install-1.3.2.php

<?php

if (!defined('_PS_VERSION_'))
        exit;

function upgrade_module_1_3_2($module)
{
        if (Tools::file_exists_cache($module->getLocalPath().'images'))
                #Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);

        Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('homeslider.tpl'));

        return true;
}
  • Like 1
Link to comment
Share on other sites

Its just problem after problem with 1.6 at the moment.

 

I got the error today too

<?php

if (!defined('_PS_VERSION_'))
	exit;

function upgrade_module_1_3_2($module)
{
	if (Tools::file_exists_cache($module->getLocalPath().'images'))
		Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);

	Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('homeslider.tpl'));

	return true;
}


reuploading the homeslider module sorted it

 

Im just glad ive not upgraded the live store yet

Link to comment
Share on other sites

well... it sorted it of a fashion.

 

I looked at the shop again, but I had the slider at the top ( which had shrunk from full width back to 3/4 of the page, and also I got one of the sliders full width at the bottom of the homepage (under the New products etc)

So I disabled it to see if the random image was the slider. It was

 

Now I cant re-enable the homeslider because it needs an update :huh:

Link to comment
Share on other sites

I had the same problem, but since I need to keep manage this module, the thing that works for me was what matt saids:

 

 

Got the same issue myself just now. 

 

I just commented out the line causing the error

 

install-1.3.2.php

<?php

if (!defined('_PS_VERSION_'))
        exit;

function upgrade_module_1_3_2($module)
{
        if (Tools::file_exists_cache($module->getLocalPath().'images'))
                #Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);

        Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('homeslider.tpl'));

        return true;
}

 

  • Like 2
Link to comment
Share on other sites

1. Edit file: /modules/homeslider/upgrade/install-1.3.2.php

2. Comment out this two lines:

//if (Tools::file_exists_cache($module->getLocalPath().'images'))
  //Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);

3. Press F5 in your back-end

4. Uncomment the previous two lines

 

This work for me. (in Prestashop 1.6)

Link to comment
Share on other sites

did not work

 

have this in the file /modules/homeslider/upgrade/install-1.3.2.php

 

 

<?php
 
if (!defined('_PS_VERSION_'))
exit;
 
function upgrade_module_1_3_2($module)
{
if (Tools::file_exists_cache($module->getLocalPath().'images'))
Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);
 
Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('homeslider.tpl'));
 
return true;
}
 
 
error is the same
[PrestaShop] Fatal error in module install-1.3.2:
Call to undefined method Tools::recurseCopy()
Link to comment
Share on other sites

have you commented the two first lines inside upgrade_module_1_3_2() function and obtain the same error?

Sorry, i can't help you.

 

The problem is that Tools has not defined the function recurseCopy.

Try:

 

<?php

if (!defined('_PS_VERSION_'))
  exit;

function upgrade_module_1_3_2($module)
{
  if (Tools::file_exists_cache($module->getLocalPath().'images'))
    if (method_exists(Tools, 'recurseCopy'))
      Tools::recurseCopy($module->getLocalPath().'images', $module->getLocalPath().'img', true);

  Tools::clearCache(Context::getContext()->smarty, $module->getTemplatePath('homeslider.tpl'));

  return true;
}
Link to comment
Share on other sites

I gave it another go upgrading...

 

Now 1.3.4 is out and im getting this error

[PrestaShop] Fatal error in module install-1.3.2:
syntax error, unexpected 'recurseCopy' (T_STRING), expecting '('

I have tried re-uploading the unmodified module, it works, but I cant configure because there is an update

So im forced to update, and the module bring up an error.

 

1.6 has been nothing but a pain in the butt since release :(

 

Looks like its here that is causing the problem ? ( in install-1.3.2.php )

if (!function_exists('recurseCopy'))
	function recurseCopy($src, $dst, $del = false)
	{
		$dir = opendir($src);

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

cheers xhostar,

I originally deleted the whole 'if' line and that worked.

Ive now replaced it and added the colon

 

Didnt need the endif; though, when I added that it highlighted as an error.

 

So, the module is now updated and working, complete with the bug regarding the width ( I specify 1107 in module width, but it stays as 779px width, So I have to start editing the js file again)

 

But, now I have 2 sliders on my homepage

 

1 slider is at the top where it should be, and is working... but not the right width

2nd slider is at the bottom, and is just a list of the images

 

I dont think this 1.6 is ready for live shops yet, its just problem after problem

 

post-404663-0-09968300-1397130199_thumb.jpg

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

  • 4 months later...

Can some body help me i'm new to prestashop, 

 

I just finish my shop, and went to admin modules and there was a massage that i was in need to update like 15 different modules so i did, and after the update my products don't open it says Fatal Error: an i don't seem to find the problem my store link is www.directez.com any help will be apreciated  because i don;t even remember what modules i did update

 

Link to comment
Share on other sites

Can some body help me i'm new to prestashop, 

 

I just finish my shop, and went to admin modules and there was a massage that i was in need to update like 15 different modules so i did, and after the update my products don't open it says Fatal Error: an i don't seem to find the problem my store link is www.directez.com any help will be apreciated  because i don;t even remember what modules i did update

 

 

http://www.prestashop.com/forums/topic/352865-hot-fatal-error-after-module-updates-wishlist/

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...