I would humbly ask the sitecake devs to please add the following to your documentation. PLEASE. Save your future customers the time that I have lost.
1) Sitecake removes all attributes from tags that it edits.
Yes it is annoying. You would think this would be documented wouldn’t you? Nah. We at sitecake would rather have you waste time trying to figure out workarounds around what we do. Isn’t it fun?
Before 1st edit: <h2 class=“anchor” id=“contact”.Contact Us</h2.
After edit: <h2.Contact Us</h2.
NAV POINTS
If you use something like bootstrap’s navigation menu system you would normally add an id to your <h2 tags so that you could set up a menu system that moved to those points on your page. Sitecake will destroy that. The solution is actually simple and one would wish that sitecake would document this but they don’t.
Simply put a empty div with the class and id that you need to create that anchor point. Kind of getting into the weeds here but you may need a class to offset the nav position if you have a navbar-fixed-top in the current implementation of bootstrap.
<div id="contact" class="anchor". </div. <h2.Contact Information<.h2.STYLES/CLASSES
Simply wrap the element with a span or div to solve the problem, adjust your css accordingly.
Another workaround is to figure out the poorly documented user styles but I haven’t been able to get it to work. But if you use this hack a user style will show up in the user style menu that your customers will see so that hack is ugly.
2) Remove need for .php being input by your customer.
Let’s face it, no one really wants an admin link on their home page to invite hackers in do they? No. So isn’t it easier to simply tell your customer to add “/admin” to their domain in the address bar to launch sitecake? Yes. Wouldn’t it be nice if the people at sitecake gave you the simple .htaccess code to do this so you didn’t need to figure it out? Yes.
I’ve added a couple extra security items also.
Options -Indexes: This prevents people from browsing into your domain’s folders.
ErrorDocument: You will have to create a 404.shtml file in your domain’s directory. So even if would be hackers attempt to access a sitecake directory they won’t get a 403 error telling them it is there but will instead get a custom 404 error.
The rewrite rule should work both in a local xampp environment as well as on a shared host without having to change the rewrite base to be something different on each. This will allow your customer to use “customerDomain.com/admin” to access sitecake. No admin link required on his page.
<.htaccess start…>
ErrorDocument 404 /404.shtml
ErrorDocument 403 /404.shtml
Options -Indexes
RewriteEngine on
RewriteBase /
RewriteCond $0#%{REQUEST_URI} ([^#])#(.)\1$
RewriteRule ^(.*)admin$ %2admin.php [R=302]
<.htaccess end…>
3) PHP5.6 on Shared Hosts.
Site cake needs 5.6+. Other sites you have on your host need something less. Oh what to do?
All of the once independent hosting services are being bought up by one company whose name I forget, but suffice it to say this simple advice is applicable to MANY shared hosts. So why not document it for developers using sitecake who have little time.
Typically, to change php version for just one subdomain on a shared host, you can do the following.
In your cpanel use “php selector” in the “software” section (just above the “advanced” section).
Navigate to the subdomain you want to have a different php version in use.
Select processed by php5.6 and click module update
It will place a php.ini file in that subdomain’s dir and update your .htaccess as well to work with it and it will create a backup of the prior .htaccess file you had there.
Now to test that it worked:
In your subdomain, create a file called phpinfo.php with the following in it:
< phpinfo.php start…>
<?php phpinfo();?>< phpinfo.php end…>
Now when you navigate in your browser to www.mysite.com/phpinfo.php it will display the version of php you are running.
Feature Requests for Sitecake
1) don’t F with attributes I put into the original html.
Just copy it back. I like it. Please leave it alone. Or have an option to do this if this breaks drag and drop or some other sitecake feature I don’t use.
2) two login passwords with individual editor configs
I don’t want my customer messing up my carefully planned and laid out web page. I just want to give them the ability to edit the text there. That’s it. No drag and drop. Just edit the text and headers is all I want to give them. But I would like to be able to give myself full editor privileges to update the site when they need something more so a different login password would do that. It also allows the customer to change his/her password without needing to relay it to me and I can still make updates with my password. If this needs to be a separate admin2.php that I need to call that would be fine too.
3) Yo User: Click somewhere else before you PUBLISH!
You make edits, you click publish, the edits vanish? WTF? Please indicate somehow on the
toolbar that you need to click over to a different field before the edits will be seen by sitecake. Or better yet have the fact that you click on the sitecake bar move focus to another edit area so that it just works. That could even be a hidden paragraph at the bottom of the page I have to provide for you.
4) Go to the domain’s root after publish+exit NOT site.com?refresh=1489010826321
Seems easy. Not sure why I get the cached version instead of the actual site.
5) Method to disable drag and drop features.
Again I just want a simple on page text editor for my customers. I don’t want them accidentally dragging things around so that I have to fix it later. I’ve put in starter text for them, now they need to tweak it.