Re: How To Create Custom Sample Data?

336 views
Skip to first unread message

MainStWebGuy

unread,
Aug 30, 2012, 4:14:41 PM8/30/12
to joomla-de...@googlegroups.com, ja...@mainstreetcomp.com
EDIT > When i mention the "path mentioned above" i'm referring to <Site Root>/installation/sql/mysql. sorry for any confusion.
On Thursday, 30 August 2012 16:03:42 UTC-4, MainStWebGuy wrote:
Hello All,

I work at a web development company and we have started to use Joomla as our CMS of choice. Recently i was asked if there is a way that we could install a Joomla site and also have the content, modules, etc already pre-installed and configured and i thought - that shouldn't be too hard... just make my own custom sample_data.sql file.

I started trying to learn how to do that by googling, searching the forums, etc and have found all kinds of different answers (some partial answers, some out dated ones, others completely wrong) but i still haven't been able to get a sample data file to install.

Right now, i have one Joomla 2.5 site up and running with the template, modules, components, articles, etc that I want to use (we'll call it Site A). I open up phpMyAdmin and do an export for the database for Site A and make a couple changes to the settings that i found here: http://forum.joomla.org/viewtopic.php?f=429&t=611099

... I then export the file (and call it sample_data.sql) and paste it into the folder mentioned above. I open that file and change the prefix on the tables to "#__". From there i run through a typical install and choose to install sample data (the default choice) when i'm prompted but i'm still getting the following error:

Error
Some errors occurred while populating the database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'openoffice=odt,odg,odp,ods,odf","filesystem":{"name":""},"upload":"1","folder_ne' at line 1 SQL=openoffice=odt,odg,odp,ods,odf","filesystem":{"name":""},"upload":"1","folder_new":"1","folder_delete":"1","folder_rename":"1","folder_move":"1","file_delete":"1","file_rename":"1","file_move":"1"},"media":{"strict":"1","iframes":"0","audio":"1","video":"1","object":"1","embed":"1","version_flash":"10,1,53,64","version_windowsmedia":"10,00,00,3646","version_quicktime":"7,3,0,0","version_java":"1,5,0,0","version_shockwave":"10,2,0,023"},"paste":{"use_dialog":"0","dialog_width":"450","dialog_height":"400","force_cleanup":"0","strip_class_attributes":"all","remove_spans":"0","remove_styles":"0","retain_style_properties":"","remove_empty_paragraphs":"1","remove_styles_if_webkit":"0","html":"1","text":"1"},"source":{"highlight":"1","numbers":"1","wrap":"1","theme":"textmate"},"table":{"width":"","height":"","border":"0","cols":"2","rows":"2","cellpadding":"","cellspacing":""},"imgmanager":{"dir":"","max_size":"","extensions":"image=jpeg,jpg,png,gif","hide_xtd_btns":"0","filesystem":{"name":""},"margin_top":"","margin_right":"","margin_bottom":"","margin_left":"","border":"0","border_width":"1","border_style":"solid","border_color":"#000000","align":"","tabs_rollover":"1","tabs_advanced":"1","attributes_dimensions":"1","attributes_align":"1","attributes_margin":"1","attributes_border":"1","upload":"1","folder_new":"1","folder_delete":"1","folder_rename":"1","folder_move":"1","file_delete":"1","file_rename":"1","file_move":"1"},"link":{"target":"","file_browser":"1","tabs_advanced":"1","attributes_anchor":"1","attributes_target":"1","links":{"joomlalinks":{"enable":"1","article_alias":"1","weblinks_alias":"1","content":"1","static":"1","contacts":"1","weblinks":"1","menu":"1"}},"popups":{"jcemediabox":{"enable":"1"},"window":{"enable":"1"}}},"spellchecker":{"engine":"googlespell","languages":"English=en","pspell_mode":"PSPELL_FAST","pspell_spelling":"","pspell_jargon":"","pspell_encoding":"","pspell_dictionary":"components\\/com_jce\\/editor\\/tiny_mce\\/plugins\\/spellchecker\\/dictionary.pws","pspellshell_aspell":"\\/usr\\/bin\\/aspell","pspellshell_tmp":"\\/tmp"},"article":{"show_readmore":"1","show_pagebreak":"1","hide_xtd_btns":"0"}}'), (2, 'Front End', 'Sample Front-end Profile', '', '3,4,5,10', '', 1, 'help,newdocument,undo,redo,spacer,bold,italic,underline,strikethrough,justifyfull,justifycenter,justifyleft,justifyright,spacer,formatselect,styleselect;paste,searchreplace,indent,outdent,numlist,bullist,cleanup,charmap,removeformat,hr,sub,sup,textcase,nonbreaking,visualchars;fullscreen,preview,print,visualaid,style,xhtmlxtras,anchor,unlink,link,imgmanager,spellchecker,article', 'contextmenu,inlinepopups,help,paste,searchreplace,fullscreen,preview,print,style,textcase,nonbreaking,visualchars,xhtmlxtras,imgmanager,link,spellchecker,article', 0, 2, 0, '0000-00-00 00:00:00', '');

I guess my initial thoughts are that I'm not exporting the data from Site A correctly... could that cause an error like this?

Has anyone had success doing this without using Akeeba+kickstart.php? Any information/insight/suggestions are very much appreciated!

Thanks,
Jason

elin

unread,
Aug 30, 2012, 4:33:19 PM8/30/12
to joomla-de...@googlegroups.com, ja...@mainstreetcomp.com
I made a page about how i do it here:

http://docs.joomla.org/Create_sample_data

You should always test first by going to phpmyadmin or whatever you use and importing joomla.sql followed by your custom sql. That will quickly help you  find any problems.

If need be you can go though it table by table to find the issue.

Elin

Niels Braczek

unread,
Aug 30, 2012, 3:57:38 PM8/30/12
to joomla-de...@googlegroups.com
Am 30.08.2012 22:03, schrieb MainStWebGuy:

> I work at a web development company and we have started to use Joomla
> as our CMS of choice. Recently i was asked if there is a way that we
> could install a Joomla site and also have the content, modules, etc
> already pre-installed and configured and i thought - that shouldn't
> be too hard... just make my own custom sample_data.sql file.

In fact, it is much easier. Just build 'your' Joomla! installation with
all the components, modules and plugins that you will include plus
Akeeba Backup. Make a backup of that installation and use KickStart to
re-install it as often as you wish. Done.

Regards,
Niels

--
| http://barcamp-wk.de · 2. Barcamp Westküste Frühjahr 2013 |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages