Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

One of the websites I help maintain uses an older version of PrestaShop ( and since enabling SSL I've noticed that the BlockCMS module editor hasn't been behaving very well. Specifically, it wasn't showing any of the CMS pages that were created so it wasn't possible to select what links were shown on the shop's sidebar.

The BlockCMS editor had everything except for the section that let you pick which pages to display in the block...

What I saw when I opened the developer console explained everything. The browser was blocking non-SSL content that the BlockCMS module was requesting. The blockcms.js JavaScript file was the one being blocked and that file is responsible for providing functions that populate the BlockCMS editor.

After some digging around I found the problem. It was in the modules/blockcms/blockcms.php file.

The _displayAddForm() function was hard-coded to use PS_BASE_URL when adding JavaScript files to a page. It should have detected whether SSL was enabled and used an appropriate base URL instead. Since I knew that I wasn't going to switch SSL off, I replaced that with PS_BASE_URL_SSL and saved the file (this is just a quick fix, I didn't want to spend time on the correct fix that detected SSL settings).

After making that change and refreshing the BlockCMS editor, all of the CMS pages were now visible and I could again select what was shown and what wasn't!


Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...