SVN Install bug

SVN Install bug, a forum discussion on Jojo CMS. Join us for more discussions on SVN Install bug on our Installation forum.

Back to Forum Index : Back to Installation   RSS
Jaijaz Jaijaz

25 Jan 2011
Posts: 215

Just been running some testing on the 1.0 SVN and thought I would run an install from scratch and found bug in the setup.php file. Unfortunately it is around the database query stuff that with the adodb stuff is a new to me.

On line 126 a Jojo::selectQuery is run but it appears that because there are no { in the query, it runs Error_log which ultimately runs listThemes but since there is no database fails.

I tried writing a basic query function to handle the 'SHOW FULL TABLES' query but each time it just ends in a bigger error.

The complete error is:

SELECT name FROM `theme` WHERE active='yes' Table 'studiolumiere.theme' doesn't existarray(7) { [0]=> array(6) { ["file"]=> string(67) "/Users/jai/Dropbox/MAMP/jojo_svn/plugins/jojo_core/classes/Jojo.php" ["line"]=> int(278) ["function"]=> string(11) "selectQuery" ["class"]=> string(4) "Jojo" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(43) "SELECT name FROM {theme} WHERE active='yes'" } } [1]=> array(6) { ["file"]=> string(67) "/Users/jai/Dropbox/MAMP/jojo_svn/plugins/jojo_core/classes/Jojo.php" ["line"]=> int(2714) ["function"]=> string(10) "listThemes" ["class"]=> string(4) "Jojo" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(25) "classes/Jojo/Eventlog.php" } } [2]=> array(4) { ["function"]=> string(8) "autoload" ["class"]=> string(4) "Jojo" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(13) "Jojo_Eventlog" } } [3]=> array(4) { ["file"]=> string(67) "/Users/jai/Dropbox/MAMP/jojo_svn/plugins/jojo_core/classes/Jojo.php" ["line"]=> int(384) ["function"]=> string(17) "spl_autoload_call" ["args"]=> array(1) { [0]=> &string(13) "Jojo_Eventlog" } } [4]=> array(6) { ["file"]=> string(51) "/Users/jai/Dropbox/MAMP/jojo_svn/includes/setup.php" ["line"]=> int(126) ["function"]=> string(11) "selectQuery" ["class"]=> string(4) "Jojo" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(16) "SHOW FULL TABLES" } } [5]=> array(4) { ["file"]=> string(50) "/Users/jai/Dropbox/MAMP/jojo_svn/includes/jojo.php" ["line"]=> int(42) ["args"]=> array(1) { [0]=> string(51) "/Users/jai/Dropbox/MAMP/jojo_svn/includes/setup.php" } ["function"]=> string(7) "require" } [6]=> array(4) { ["file"]=> string(56) "/Users/jai/Dropbox/MAMP/studiolumiere/pub_html/index.php" ["line"]=> int(36) ["args"]=> array(1) { [0]=> string(50) "/Users/jai/Dropbox/MAMP/jojo_svn/includes/jojo.php" } ["function"]=> string(12) "require_once" } }
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

26 Jan 2011
Posts: 215

Update. If you create the theme table manually it then, as expected, throws the same problem on the plugins table after trying to run and listPlugins.
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

26 Jan 2011
Posts: 215

Ok so the fix for that error is to change line 383 in the jojo_core/classes/jojo.php from:

if (strpos($query, '{') === false) {

to

if (strpos($query, '{') === false && strtolower(trim($_REQUEST['uri'], '/')) != 'setup') {

Unfortunately I can't commit changes at the moment so can't commit this. Besides, not sure if this is the right approach as it feels a little bandaid like.

After that the install scripts crashes on the indexes_page.php file so I'm now trying to work on that.
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

26 Jan 2011
Posts: 215

Man, I am learning heaps about the install/setup scripts here.

So it appears that on setup initial currently doesn't install the tabledata and fielddata stuff or the indexes. You need to rerun the setup script for this to work. I thought this might be due to the files in the install directory being run in alphabetical order. Meaning that autoupdate and indexes files are run before the table is created but this doesn't seem to be it as renaming the files didn't change anything. However changing the order of the files being run meant that the indexes_page.php issue didn't occur.

Also initial setup doesn't appear to let you log in. Rerunning setup fixed this too.

Starting to get totally lost now so hope someone can help me fix this.
If you not living on the edge you taking up too much space.
Harvey

Core Developer

Harvey

26 Jan 2011
Posts: 327

The indexing changes is something I added recently (just before xmas I think). It's possible there are issues with it, so roll back to a previous version of setup.php if it's giving you grief.

I'm back in the office as of this morning but are swamped with work, so might be early next week before I can realistically spend any time on this.

Sorry if it's put you out at all.
Jaijaz Jaijaz

27 Jan 2011
Posts: 215

To be honest I'd prefer not to rollback as the index stuff is too good and needed. My posts are in lue of a bug tracker. I'll have another another read through the code at some point to try and work out whats going on.
If you not living on the edge you taking up too much space.
Back to Forum Index : Back to Installation   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.