Using sitecake with SHTML files

Greetings everyone.

I am rather new to Sitecake and came across it whilst looking for an easy to implement and use CMS system for an existing website.

I have set up WAMP64 and installed the site on it along with Sitecake. However, the site uses only SHTML files and every page incorporates ‘includes’ for the header, footer and some sidebars.

I have configured WAMP64 to display included files but when I use Sitecake I only have the index.shtml file displayed. All included elements are not displayed and if I was wanting to use Sitecake on a different page, say, the ‘aboutus.shtml’ it would revert to displaying ‘index.shtml’.

Is there anything I can do to make Sitecake operate correctly on all pages?

So far I have added the ‘sc-content’ to one div on the index page and one div on the aboutus page in order to test it out.

Thanks all

Hi, SHTML is supported by sitecake so not sure what could be the problem. Can you send link to your site and sitecake password in private message so I can check it out.

Thanks for the prompt reply. As I said I am only using sitecake locally on a WAMP server so giving the domain of the static HTML site is of little value as it is not Sitecake enabled. However, the domain is: dumpdefridge.com

If you can provide any further assistance, I would be grateful.

Check out for /sitecake-temp/logs dir for log file, or check in your server or php logs if you can find if there is any server/php related errors.

When working with SHTML includes same rules apply as it is php include, so also check out include rules in our Docs (http://sitecake.com/docs/working-with-php.html)

The sitecake-temp/logs folder contained the following:

[2017-01-04 09:16:37] Error: exception ‘Sitecake\Exception\FileNotFoundException’ with message ‘Default page file “[index.html, index.htm, index.php, index.php5]” not found’ in C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Site.php:691
Stack trace:
#0 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Site.php(852): Sitecake\Site->getDefaultIndex()
#1 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Renderer.php(26): Sitecake\Site->getDefaultPublicPage()
#2 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Dispatcher.php(55): Sitecake\Renderer->loginResponse()
#3 C:\wamp64\www\test\sitecake\2.3.6\src\app.php(16): Sitecake\Dispatcher->dispatch(Object(Symfony\Component\HttpFoundation\Request))
#4 [internal function]: {closure}(Object(Silex\Application), Object(Symfony\Component\HttpFoundation\Request))
#5 C:\wamp64\www\test\sitecake\2.3.6\vendor\symfony\http-kernel\HttpKernel.php(153): call_user_func_array(Object(Closure), Array)
#6 C:\wamp64\www\test\sitecake\2.3.6\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#7 C:\wamp64\www\test\sitecake\2.3.6\vendor\silex\silex\src\Silex\Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 C:\wamp64\www\test\sitecake\2.3.6\vendor\silex\silex\src\Silex\Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
#9 C:\wamp64\www\test\sitecake\2.3.6\src\app.php(43): Silex\Application->run()
#10 C:\wamp64\www\test\sitecake.php(1): require(‘C:\wamp64\www\t…’)
#11 {main}
[2017-01-04 09:16:37] Error: [Sitecake\Exception\FileNotFoundException] Default page file “[index.html, index.htm, index.php, index.php5]” not found
Stack Trace:
#0 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Site.php(852): Sitecake\Site->getDefaultIndex()
#1 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Renderer.php(26): Sitecake\Site->getDefaultPublicPage()
#2 C:\wamp64\www\test\sitecake\2.3.6\src\Sitecake\Dispatcher.php(55): Sitecake\Renderer->loginResponse()
#3 C:\wamp64\www\test\sitecake\2.3.6\src\app.php(16): Sitecake\Dispatcher->dispatch(Object(Symfony\Component\HttpFoundation\Request))
#4 [internal function]: {closure}(Object(Silex\Application), Object(Symfony\Component\HttpFoundation\Request))
#5 C:\wamp64\www\test\sitecake\2.3.6\vendor\symfony\http-kernel\HttpKernel.php(153): call_user_func_array(Object(Closure), Array)
#6 C:\wamp64\www\test\sitecake\2.3.6\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#7 C:\wamp64\www\test\sitecake\2.3.6\vendor\silex\silex\src\Silex\Application.php(496): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 C:\wamp64\www\test\sitecake\2.3.6\vendor\silex\silex\src\Silex\Application.php(477): Silex\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
#9 C:\wamp64\www\test\sitecake\2.3.6\src\app.php(43): Silex\Application->run()
#10 C:\wamp64\www\test\sitecake.php(1): require(‘C:\wamp64\www\t…’)
#11 {main}

I hope this can throw some light on the issue.

Sorry, didn’t figure that you are using .shtml extension from your post. Just add index.shtml to ‘site.default_pages’ app variable array in sitecake/2.3.6/config/config.php. It should look like this:

$app[‘site.default_pages’] = [‘index.shtml’, ‘index.html’, ‘index.htm’, ‘index.php’, ‘index.php5’];

I had already done that and to no avail.

I have since set up a testing area on my server:

dumpdefridge.com/test2/

When you go to this address the pages will show as per the main site. However, if you try:

dumpdefridge.com/test2/sitecake.php

it will error out.

Your PHP version on server is 5.3. PHP 5.6 is minimal required version for Sitecake to run

Thanks. I suspected as much. I’ll keep you informed once things have developed further.

The owner has now updated to PhP 5.6. I have done a fresh install but when I try to run sitecake.php I get:

Fatal Error: Call to undefined function mb_eregi() in file [SITE]/sitecake/2.3.6/vendor/electrolinux/phpquery/phpQuery/phpQuery/phpQueryObject.php on line (#305)

Any suggestions?

Hi gd extension and mbstring extensions for PHP are required to run Sitecake. Error is due to missing mbstring extension

As shown in my other thread, these extensions are embedded but the problem persists.