Free package Starting Point Generator

Permalink 1 user found helpful
Just wanted to share for anyone interested in making StartingPoints that I've built a StartingPoint Generator package which you can install on your site and at the click of a button it will make a valid StartingPoint complete with controller and a trimmed down content.xml file. It's free and you can find it on GitHub at https://github.com/goldhatdev/starting_point_generator....

The improvement over using Sample Content Generator is that the content.xml file from StartingPoint Generator is trimmed to remove all the items that are already installed by the C5 base installer. Which should remove most (though perhaps not all) errors caused by having duplicate objects in your XML. It also provides the convenience of generating the package controller.

I should add this is a first attempt at this. Please don't rely on it for anything vital. It is designed to cut down the manual work with XML in starting points but you may find your exported XML is not perfect. I've noticed some issues where certain content was missing in the imported site, perhaps due to issues with aliased blocks. If you have time to help test this, and report issues, that's greatly appreciated. This was built for and only tested so far in C5 version 5.6.2.

Thanks to mhawke and our discussion on this topic athttp://www.concrete5.org/community/forums/customizing_c5/support-fo... for inspiring the work.

Thanks to C5 member kino and his earlier work on trimming down the XML exported from Sample Content Generator athttp://www.concrete5.org/marketplace/addons/sample-content-generato...

 
mhawke replied on at Permalink Best Answer Reply
mhawke
I have one site where it times out and another where it worked great. I'll let you know how it re-installs for me when I get the chance.

Could you optionally zip up the files and download instead of just sticking them in files/startingpoint ? I like to zip up large numbers of files for up/download because I have found that my ISP will hiccup every once in a while and I can never be sure of the integrity of all the files unless I zip them up first. Much, much faster as well.
goldhat replied on at Permalink Reply
At first I was having the starting point zipped but then I thought not every server is going to support the PHP zip extension. Also I think developers using this will find it fairly easy to zip it themselves before download.
mhawke replied on at Permalink Reply
mhawke
It's fine. I just try to avoid having to go into the cPanel->File Manager to zip up the files. That's why I mentioned it could be a option.
goldhat replied on at Permalink Reply
Have you tried the Sample Content Generator on that site where Starting Point Generator is timing out? Just wondering if it it's timing out on the export XML process (which is in both packages) or in the XML trimming which is only in Starting Point Generator.
mhawke replied on at Permalink Reply
mhawke
I just tried it again and I noticed this error buried under my toolbar:

Warning: DOMDocument::loadXML(): EntityRef: expecting ';' in Entity, line: 616 in /home/richmond/public_html/concrete/core/helpers/text.php on line 306


I'll dig a little further.
mhawke replied on at Permalink Reply
mhawke
Same error with the core's 'Sample Content Generator' so it's not your work that's having an issue. I believe this is the issue I had with it before which lead me to give up on it a year ago. I believe at the time I isolated it to some Google Map code that was tripping up the XML parser.
mhawke replied on at Permalink Reply
mhawke
I think I've isolated it to some content I copy 'n pasted from an email I received into a content block. Always a bad idea but this happens in the real world so the loadXML process needs to be resilient if this is is ever going to work.
goldhat replied on at Permalink Reply
Can you post a snippet of the part of the content that caused the problem? I'll insert it into blocks and test... and see if we can solve that in the export. Maybe we can escape it or encode in a way it won't cause an error... or even if we just detected, and skipped it... and then printed a message onscreen that says "this page has content with a problem, x-block removed". Then you could fix the problem block content, and run the export again.