Jump to content

Can't add CMS Block information


Recommended Posts

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

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

  • Like 1
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...