Sitecake's Missing Documentation

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.


Hi MT123,

I understand the frustration when things don’t work as expected. I am not a developer, simply a user. I think SiteCake was mostly meant to do what it does.

  1. Styles get lost if you code them traditionally, but you can simply write your CSS to style on all elements within a specific DIV class or id. That works for me,

  2. Besides usinh .htaccess, one could also create a subdirectory with an index.htm that redirects to /sitecake.php. That way the url rewrite struggle would be brought down by simply creating a directory with the name you’d like.

  3. Webhosts can only move forward, Having a new and improved (and maybe more secure) version of software is a good thing, even though it sometimes calls for updates.

  4. About the multiple password thing: I feel the intention is to keep things a light and simple as possible. You as a developer, can edit the webpage parts that do not contain the sc-content class and the rest is up to the client.

  5. I am not sure about disabling the Drag&Drop. I understand the need for restrictions, but this is the very core of the CMS.

In short, I get the suggestions. Some make sense to implement. However, I feel SiteCake would lose it’s simplicity if it would be changed into something with multiple users and settings and page locks.

This is ofcourse just one user’s experience. Maybe there is a developer who’d like to address some of the things you’ve mentioned. :slight_smile:

@MT123 thanks for your feedback, we really appreciate when someone puts this effort into feedback.

  1. Sitecake should not remove element id. This is a bug. We will fix this in next release.

On the other hand removing classes that are not defined as user styles is by design. Please define styles as user styles and they will not be removed. Defining users styles is explained here https://sitecake.com/docs/user-styles.html

  1. First thing you should do once you install Sitecake is to change default password and rename sitecake.php entry point file to something else. There is an option in sitecake/[version number]/config.php to do it.

    $app[‘entry_point_file_name’] = ‘sitecake.php’;

  2. For me, keeping different php websites on the same hosting is a security risk.

Feature requests:

  1. @hitcom got it right. We are really trying to keep things as simple as possible. If we upgrade each feature to a more poweful version we will end up with overall complex CMS, and you already have those on the market. So we are going to upgrade only features that are most wanted by you guys. We are recording feature requests and most wanted things are going on the assembly line. So thanks you for your input.

  2. We assume that if user is still in edit field he is not finished with editing, so Sitecake waits the edit field to lose focus and then write down the change.

  3. We wanted to keep the user on the page she edited in order to see how live page looks like.

  4. Sitecake is drag and drop CMS before all other things. You are the first user to ask for this.

Once again, thanks for your feedback guys!

@Nik

  1. thanks for recognizing this as a bug
    Note that I was asking not just for ID and CLASS attributes but all attributes.
    Note that it would be far better to have a SCDT-xyz format or something to indicate SiteCakeDon’tTouch classes. If I need to add a class for javascript I shouldn’t have to define a sitecake class IMHO. And HINT HINT, you need to re-write your documentation on how to do sitecake css styles. What the F is it that triggers sitecake into recognizing a style - start with that!

  2. Yes of course this was done as was mentioned in my example as admin.php. That doesn’t make the .htaccess file I submitted any less relevant although you apparently think so.

  3. Yeah whatever, still useful for those that are aware that this is perfectly acceptable practice. No different really than specifying in a script to run bash vs csh vs sh for example.

Features

  1. Really?! Adding a feature to add pages is under low complexity but having 2 logins is defined as high complexity? Really? I have a simple hack that makes this work but at this point I’m done sharing.

  2. The suggestion was to have the act of clicking on the menu bar remove focus from the element being edited. For example you could have 2 buttons 1)CHECK 2)PUBLISH where clicking on the check button removes focus and ensures that the stuff just edited is saved. You do realize that this “feature” of discarding edits if you don’t click somewhere else first is not expected behavior for 99% of users out there right?

  3. Well then there is a bug in the version I am using since if I am on a different page it still returns to the index.html page but has the added crap in the address bar.

  4. Note that most of the work I do is to create non profit websites where I do all the work for free and then leave it in the hands of unknown volunteers to update the pages in the future. I chose and paid for your system since it is by far the easiest/most-intuitive CMS to use. I don’t want to give the wrong impression, I do like sitecake even as it is today. That said I am offering up ways to make it easier to use and idiot proof to reduce the calls that the people that pay for your software get. Many of my end users are in their 70’s+ and are barely able to operate a computer. This (idiot proof simple for end user edits without Fing up the site) in my opinion is one of your biggest target markets. I can confidently say that I don’t want anyone adding pages and moving elements around on a page and I would guess many others feel the same. But hey, keep on adding more features (like adding more pages!) that make it more complex to use and less valuable to people like me.