SeasonalEntertainment Posted May 29, 2013 Share Posted May 29, 2013 Hi all, Having some trouble adding things to the CMS block. I have all the pages made and when I go into the CMS Block module I click "Add New". In there I pick that I want it on the left, check off the ones I want added and click save. After doing so nothing shows up in the Left Columns section and at the bottom of the page I get the follow error: [PrestaShop] Fatal error in module f69875466b6014a6d742e6091dacb2abdf5c2f55.file.form.tpl: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 Can anyone help me get this fixed? Appreciate it. Greg Link to comment Share on other sites More sharing options...
PascalVG Posted May 29, 2013 Share Posted May 29, 2013 The function probably called is this one: str_repeat(' ',($_smarty_tpl->tpl_vars['cms_category']->value['level_depth']-1)*4)) and comes if I'm right from the file: /modules/blockcms/views/templates/admin/_configure/helpers/form/form.tpl The source string is: <td><label for="{$id_checkbox}" class="t"><strong>{str_repeat(' ', ($cms_category['level_depth'] - 1) * 4)|cat:$cms_category['name']}</strong></label></td> What it wants to do is indent the line with 'level depth'*4 spaces As 'Home' is normally level '1' it subtracts 1 (i.e. -1) from the level. The only category that has a level 0 is 'Root', so if tis one is chosen, 0-1 = -1*4 = -4 is given as 2nd parameter to the function str_repeat, which is invalid. So somehow you probably chose 'root' as item to show in the cms block, instead of 'Home', causing this problem. Do you see anything that looks like 'root' or some other category or item that is depth_level=0 or maybe has ID=0? My 2 cents, pascal 1 Link to comment Share on other sites More sharing options...
vekia Posted May 29, 2013 Share Posted May 29, 2013 hello this error appear after inserting any content, or only if you put there specific content? Link to comment Share on other sites More sharing options...
SeasonalEntertainment Posted May 30, 2013 Author Share Posted May 30, 2013 Hi Folks. Thanks for the fast replies. There is no root option, just Home and left and right. It is the same error no matter what for left or right and it happens on any combination of the products. Not really sure what it is. Greg Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now