2 mgsolipa Jun 23, 2015 22:25

 
 

To be exact: you should absolutely avoid having a custom _toolbar.inc.php or even a custom _html_header.inc.php in your custom skin.
These files can change at any upgrade.

ok I am confused... how exactly do you fix this? it has happened on all my sites custom skin or not. old skins?

@gcasanova did you replace the core files included in the skins folder? I mean, sf-menu-right has been replaced by evobar-menu-right in the file _toolbar.inc.php, which is now located at the skins_fallback_v5 folder.
I'm confused. how do we fix it? please advise.

@dangrigor: you should look into all your custom skins and get rid of the file _toolbar.inc.php. In addition, as mentioned by @fplanque,  _html_header.inc.php should also be deleted from custom skins when present, even if it doesn't throw any error.

(a bit late to the party, I know!)
So, removed the html_header from the skin folder and it works. So, how can we include custom javascript that would normally go in the header? That's the only thing I had different, and when I tried to take the new html_header, JUST add the script and replace it in the skin file, I get the error again.

@dubird you should use a require_js('filename.js', 'relative'); call in the display_init() method of your skin's _skin.class.php file.
This way: https://github.com/b2evolution/b2evolution/blob/master/skins/touch/_skin.class.php#L131. In that case, there is a js/core.js file inside the skin's folder.

@dubird What JS are you trying to add? Does it work if you just add it here: http://b2evolution.net/man/skin-and-style
@gcasanova did you replace the core files included in the skins folder? I mean,
sf-menu-righthas been replaced byevobar-menu-rightin the file _toolbar.inc.php, which is now located at the skins_fallback_v5 folder.You can see both files here:
Version 5.2.2: https://github.com/b2evolution/b2evolution/blob/i6/blogs/skins/_toolbar.inc.php
Version 6.4.4: https://github.com/b2evolution/b2evolution/blob/master/skins_fallback_v5/_toolbar.inc.php
I have no idea what skin are you using, but if it loads a customized _toolbar.inc.php, you should be awared of this changes and update it.
Regards!