Jump to content

Fatal error: Function name must be a string in ~


Recommended Posts

I developed a theme for my prestashop store locally through XAMPP. Now I have installed prestashop on a bought shared-server (hosting), and integrated the theme I developed. However, every other click around the website it gives me this error:

 

 

"Notice: Undefined index: unifunc in /storage/content/21/104221/midanacensored.com/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281 Fatal error: Function name must be a string in /storage/content/21/104221/midanacensored.com/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281"

 

 

 

I emptied the cache for smarty, I also tried disabling/enabling Smarty function under "prestanda", back and forth to see what happens - no difference.

 

I'm not sure what to do about this at all. :( And would love for some insight into this.

Link to comment
Share on other sites

I have this on: define('_PS_MODE_DEV_', true))

 

These show up on every page that show the website itself:

 

 

/storage/content/21/104221/censored.se/public_html/cache/smarty/compile/7d/83/87/7d838714b0f825897ebdf45cea92a235f8e65b07.file.header.tpl.php on line 155 Notice: Trying to get property of non-object in /storage/content/21/104221/censored.se/public_html/cache/smarty/compile/7d/83/87/7d838714b0f825897ebdf45cea92a235f8e65b07.file.header.tpl.php on line 155

 

 

 

 

Notice: Undefined index: category in /storage/content/21/104221/censored.se/public_html/cache/smarty/compile/1e/08/a6/1e08a69543256aca8f37c2c87c2e61a47d3b8c7b.file.footer.tpl.php on line 45 Notice: Trying to get property of non-object in /storage/content/21/104221/censored.se/public_html/cache/smarty/compile/1e/08/a6/1e08a69543256aca8f37c2c87c2e61a47d3b8c7b.file.footer.tpl.php on line 45 Notice: Trying to get property of non-object in /storage/content/21/104221/censored.se/public_html/cache/smarty/compile/1e/08/a6/1e08a69543256aca8f37c2c87c2e61a47d3b8c7b.file.footer.tpl.php on line 45

 

 

 

Then this message show up where it used to be a 500 error page (before I set the above PS MODE DEV to true):

 

 

Notice: Undefined index: unifunc in /storage/content/21/104221/censored.se/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281 Fatal error: Function name must be a string in /storage/content/21/104221/censored.se/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281

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

Does your folders are well in CHMOD 755 and Files 644 ?

 

Does error message appears when you activate the default theme ?

If you don't have error message with the default theme are you sure that the theme that you developped is for the same version installed ? for example if you have developped your theme for a 1.4 and you've installed a 1.5 it will not work.

Link to comment
Share on other sites

Yes, those are the CHMOD's (It seems).

 

I first developed the theme on a local installation of Prestashop, that used to be one version earlier. Then the update came, and I updated it so it always had the latest version.

Then I installed the latest version also, on my hosted server, where I then just dragged the theme over and set it. It should work right?

 

I tried using the default, but that doesn't work better either. :/ However, I noticed that the default theme didn't look as it should have. Some elements overlap.

 

When I choose to have the debug console open, should I copy/paste what it says here? Or that doesn't have anything to do with it?

Link to comment
Share on other sites

It seems or you're sure ? For everything ?

 

Have you same PHP et mysql version ?

Upload everything again in binary mode.

 

Is your php.ini ok according to the documentation :

http://doc.prestashop.com/display/PS15/Setting+up+your+local+development+environment

 

I'm not sure for debug console that it has something to do here, as your default theme is not workiong properly it's something about your configuration or your version.

 

Par hasard have you install the very same verrsion or upgrade from a side and reinstall a complete on the other side ?

Link to comment
Share on other sites

I will redo them all according to what you said, and see if it works.

 

Hosted

Mysql:mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $

PHP: PHP Version 5.3.10-1ubuntu3.7

 

Local

Mysql: 5.5.27 - MySQL mysqlnd 5.0.10

PHP: PHP/5.4.7

 

 

I upgraded to the lastest version on the local installation, while I already had the theme. Then when I moved the theme to the hosted server - it was on a new installation of the latest version.

 

 

 

I don't find a php.ini file, where do I find it. And if there ain't one - how do I make it?

Link to comment
Share on other sites

i can't find with only this :-)

I think it's in your tpl each error indicates you where is the problem.

 

7d838714b0f825897ebdf45cea92a235f8e65b07.file.header.tpl.php on line 155

Header.tpl

1e08a69543256aca8f37c2c87c2e61a47d3b8c7b.file.footer.tpl.php on line 45

footer.tpl

 

Compare with the theme default for quite similar code and adjust your theme.

Read carefully the documentation for deleting smarty cache you have to preserve the index file.

Link to comment
Share on other sites

  • 5 months later...

I know it's been a while, but hopefully this helps. :D

I developed a theme for my prestashop store locally through XAMPP. Now I have installed prestashop on a bought shared-server (hosting), and integrated the theme I developed. However, every other click around the website it gives me this error:


"Notice: Undefined index: unifunc in /storage/content/21/104221/midanacensored.com/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281 Fatal error: Function name must be a string in /storage/content/21/104221/midanacensored.com/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php on line 281"



I emptied the cache for smarty, I also tried disabling/enabling Smarty function under "prestanda", back and forth to see what happens - no difference.

I'm not sure what to do about this at all. :( And would love for some insight into this.

 

 

I'm running PS 1.5.3.1 and I was having the issue described above. After searching for quite a while, I found an issue tracker page related to this problem:

http://forge.prestashop.com/browse/PSCFV-10040

 

After modifying my classes/modules/Module.php file to reflect the following commits, the site works perfectly well:

https://github.com/PrestaShop/PrestaShop/commit/242556e176502ec61271a3945e1337917bc88f93

https://github.com/PrestaShop/PrestaShop/commit/ccb3179c1ae04b6bd41d571f0b1f950d6fd49f13

 

I hope that this was helpful to someone, as it took me a while to find this solution.

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