Upgrading from Joomla 1.5 to 1.7, and Fabrik 2 to Fabrik 3

ozrebel

Member
Hi all.

I have just gone through the process of upgrading a site from Joomla 1.5 to 1.7, and Fabrik 2 to Fabrik 3, and thought that I would share my experiences in the hope that it may make the process easier for others.

To start with, I chose JUpgrade to manage the process of upgrading Joomla. (http://extensions.joomla.org/extensions/migration-a-conversion/joomla-migration/11658)

What this does is install a component on your existing Joomla 1.5 site.

You need to check a few things about your site, and once you have satisfied all of the prerequisites, you run JUpgrade.

It goes off, downloads the latest version of Joomla 1.7, then runs a series of scripts to copy articles, categories, templates etc, and creates j17_ database tables in your existing database, alonside your jos_ tables.

Once all of this has completed you then navigate to your jupgrade sub-directory which has been created upon install and open your brand new Joomla 1.7 site.

You can then install Fabrik 3 as normal.

Once you have done this, open phpMyAdmin and drop (or, if you're ultra careful like me, rename) the fabrik database tables that have been created - i.e. j17_fabrik_elements etc.

Then copy your jos_ fabrik tables to j17_

So, in phpMyAdmin, copy jos_fabrik_elements to j17_fabrik_elements etc.

Once this is done, you can then navigate to the Fabrik front page in your backend (jupgrade directory), and run the Upgrade from 2.1 utility which you will find under Tools.

Hope this makes sense, and helps someone else who might need to upgrade.
 
Any solution for when you click "Upgrade from 2.1" you get a page:

500 - An error has occurred.
Could not connect to MySQL.
Return to Control Panel << That's a link to the Joomla Admin Control Panel


Other than that, thanks for clarifying the process, now if I can only get it working :confused:
 
Assuming you were using just the default site connection in f2 (i.e. hadn't defined any other database connections in the Fabrik connections list) ... is the default site connection still valid? Or have you changed the password as part of the upgrade process in JUpgrade?

The first thing we do is attempt to backup any tables from your f2 fabrik_tables table, using the connection(s) as defined in the original fabrik_connections table.

So if (say) you've changed the database password as part of the JUpgrade procedure, that could be the problem.

If you did change the password of your default site connection, try changing it back to what it was prior to the upgrade.

-- hugh
 
Hugh,

The site I am trying this on is a test site on a different server (the real site is too important to risk any problems).

The password was the same, but obviously the user and database were different. I went into the mysql database and changed the user/database in the j17_fabrik_connections and jos_fabrik_connections to contain the correct values for the test site but I am still getting the same error.

Any other ideas?

Thanks,
Justin
 
OK, solved that problem by removing the encryption from the password stored in the connections table. I was then able to run the upgrade link and it said it something like "Upgrade OK".

Now I get the following errors when trying to access the stuff from the backend. Did I do something wrong?? I followed the instructions in the original post.

Lists:
Code:
[B]500 - An error has occurred.[/B]

 				Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT l.* FROM j17_fabrik_lists AS l WHERE (l.published IN (0, 1)) ORDER BY label asc Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT l.* FROM j17_fabrik_lists AS l WHERE (l.published IN (0, 1)) ORDER BY label asc LIMIT 0, 20 Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT l.* FROM j17_fabrik_lists AS l WHERE (l.published IN (0, 1)) ORDER BY label asc Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT l.* FROM j17_fabrik_lists AS l WHERE (l.published IN (0, 1)) ORDER BY label asc


 				Return to Control Panel

Forms:
Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'f.published' in 'where clause' SQL=SELECT f.*,u.name AS editor FROM j17_fabrik_forms AS f LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (f.published IN (0, 1)) ORDER BY name asc Unknown column 'f.published' in 'where clause' SQL=SELECT f.*,u.name AS editor FROM j17_fabrik_forms AS f LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (f.published IN (0, 1)) ORDER BY name asc LIMIT 0, 20 Unknown column 'f.published' in 'where clause' SQL=SELECT f.*,u.name AS editor FROM j17_fabrik_forms AS f LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (f.published IN (0, 1)) ORDER BY name asc Unknown column 'f.published' in 'where clause' SQL=SELECT f.*,u.name AS editor FROM j17_fabrik_forms AS f LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (f.published IN (0, 1)) ORDER BY name asc


Return to Control Panel

Elements:
Code:
[B]500 - An error has occurred.[/B]

 				Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT e.*, 				e.ordering AS ordering,u.name AS editor, (SELECT DISTINCT( 		IF( ISNULL(jj.table_join), CONCAT(ll.db_table_name, '___', ee.name), CONCAT(jj.table_join, '___', ee.name)) 		) 		FROM j17_fabrik_elements AS ee 		LEFT JOIN j17_fabrik_joins AS jj ON jj.group_id = ee.group_id 		LEFT JOIN j17_fabrik_formgroup as fg ON fg.group_id = ee.group_id 		LEFT JOIN j17_fabrik_lists AS ll ON ll.form_id = fg.form_id 		WHERE (jj.list_id != 0 AND jj.element_id = 0) 		AND ee.id = e.id AND ee.group_id <> 0  LIMIT 1)  AS full_element_name, g.name AS group_name, l.db_table_name FROM j17_fabrik_elements AS e LEFT JOIN j17_users AS u ON checked_out = u.id LEFT JOIN j17_fabrik_groups AS g ON e.group_id = g.id  LEFT JOIN j17_fabrik_formgroup AS fg ON fg.group_id = e.group_id LEFT JOIN j17_fabrik_lists AS l ON l.form_id = fg.form_id WHERE (e.published IN (0, 1)) ORDER BY ordering asc Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT e.*, 				e.ordering AS ordering,u.name AS editor, (SELECT DISTINCT( 		IF( ISNULL(jj.table_join), CONCAT(ll.db_table_name, '___', ee.name), CONCAT(jj.table_join, '___', ee.name)) 		) 		FROM j17_fabrik_elements AS ee 		LEFT JOIN j17_fabrik_joins AS jj ON jj.group_id = ee.group_id 		LEFT JOIN j17_fabrik_formgroup as fg ON fg.group_id = ee.group_id 		LEFT JOIN j17_fabrik_lists AS ll ON ll.form_id = fg.form_id 		WHERE (jj.list_id != 0 AND jj.element_id = 0) 		AND ee.id = e.id AND ee.group_id <> 0  LIMIT 1)  AS full_element_name, g.name AS group_name, l.db_table_name FROM j17_fabrik_elements AS e LEFT JOIN j17_users AS u ON checked_out = u.id LEFT JOIN j17_fabrik_groups AS g ON e.group_id = g.id  LEFT JOIN j17_fabrik_formgroup AS fg ON fg.group_id = e.group_id LEFT JOIN j17_fabrik_lists AS l ON l.form_id = fg.form_id WHERE (e.published IN (0, 1)) ORDER BY ordering asc LIMIT 0, 20 Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT e.*, 				e.ordering AS ordering,u.name AS editor, (SELECT DISTINCT( 		IF( ISNULL(jj.table_join), CONCAT(ll.db_table_name, '___', ee.name), CONCAT(jj.table_join, '___', ee.name)) 		) 		FROM j17_fabrik_elements AS ee 		LEFT JOIN j17_fabrik_joins AS jj ON jj.group_id = ee.group_id 		LEFT JOIN j17_fabrik_formgroup as fg ON fg.group_id = ee.group_id 		LEFT JOIN j17_fabrik_lists AS ll ON ll.form_id = fg.form_id 		WHERE (jj.list_id != 0 AND jj.element_id = 0) 		AND ee.id = e.id AND ee.group_id <> 0  LIMIT 1)  AS full_element_name, g.name AS group_name, l.db_table_name FROM j17_fabrik_elements AS e LEFT JOIN j17_users AS u ON checked_out = u.id LEFT JOIN j17_fabrik_groups AS g ON e.group_id = g.id  LEFT JOIN j17_fabrik_formgroup AS fg ON fg.group_id = e.group_id LEFT JOIN j17_fabrik_lists AS l ON l.form_id = fg.form_id WHERE (e.published IN (0, 1)) ORDER BY ordering asc Table 'coldsys9_desowvtest.j17_fabrik_lists' doesn't exist SQL=SELECT e.*, 				e.ordering AS ordering,u.name AS editor, (SELECT DISTINCT( 		IF( ISNULL(jj.table_join), CONCAT(ll.db_table_name, '___', ee.name), CONCAT(jj.table_join, '___', ee.name)) 		) 		FROM j17_fabrik_elements AS ee 		LEFT JOIN j17_fabrik_joins AS jj ON jj.group_id = ee.group_id 		LEFT JOIN j17_fabrik_formgroup as fg ON fg.group_id = ee.group_id 		LEFT JOIN j17_fabrik_lists AS ll ON ll.form_id = fg.form_id 		WHERE (jj.list_id != 0 AND jj.element_id = 0) 		AND ee.id = e.id AND ee.group_id <> 0  LIMIT 1)  AS full_element_name, g.name AS group_name, l.db_table_name FROM j17_fabrik_elements AS e LEFT JOIN j17_users AS u ON checked_out = u.id LEFT JOIN j17_fabrik_groups AS g ON e.group_id = g.id  LEFT JOIN j17_fabrik_formgroup AS fg ON fg.group_id = e.group_id LEFT JOIN j17_fabrik_lists AS l ON l.form_id = fg.form_id WHERE (e.published IN (0, 1)) ORDER BY ordering asc


Return to Control Panel

Visualizations:
Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'v.published' in 'where clause' SQL=SELECT v.*,u.name AS editor FROM j17_fabrik_visualizations AS v LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (v.published IN (0, 1)) ORDER BY name asc Unknown column 'v.published' in 'where clause' SQL=SELECT v.*,u.name AS editor FROM j17_fabrik_visualizations AS v LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (v.published IN (0, 1)) ORDER BY name asc LIMIT 0, 20 Unknown column 'v.published' in 'where clause' SQL=SELECT v.*,u.name AS editor FROM j17_fabrik_visualizations AS v LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (v.published IN (0, 1)) ORDER BY name asc Unknown column 'v.published' in 'where clause' SQL=SELECT v.*,u.name AS editor FROM j17_fabrik_visualizations AS v LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (v.published IN (0, 1)) ORDER BY name asc


Return to Control Panel

Packages:
Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'p.published' in 'where clause' SQL=SELECT p.*,u.name AS editor FROM j17_fabrik_packages AS p LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (p.published IN (0, 1)) AND external_ref <> 1 ORDER BY name asc Unknown column 'p.published' in 'where clause' SQL=SELECT p.*,u.name AS editor FROM j17_fabrik_packages AS p LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (p.published IN (0, 1)) AND external_ref <> 1 ORDER BY name asc LIMIT 0, 20 Unknown column 'p.published' in 'where clause' SQL=SELECT p.*,u.name AS editor FROM j17_fabrik_packages AS p LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (p.published IN (0, 1)) AND external_ref <> 1 ORDER BY name asc Unknown column 'p.published' in 'where clause' SQL=SELECT p.*,u.name AS editor FROM j17_fabrik_packages AS p LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (p.published IN (0, 1)) AND external_ref <> 1 ORDER BY name asc


Return to Control Panel

Connections:
Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_connections AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_connections AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc LIMIT 0, 20 Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_connections AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_connections AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc


Return to Control Panel

Schedule:
Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_cron AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_cron AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc LIMIT 0, 20 Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_cron AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc Unknown column 'c.published' in 'where clause' SQL=SELECT c.*,u.name AS editor FROM j17_fabrik_cron AS c LEFT JOIN j17_users AS u ON checked_out = u.id WHERE (c.published IN (0, 1)) ORDER BY name asc


Return to Control Panel

Groups appears to be working fine...

Thoughts?
 
Hmmm, looks like the upgrade script has not been run on those j17_ tables.

Can you look at the table structures of your two sets of tables, and see if it looks like the original set have been processed? So, things like 'attribs' renamed to 'params', 'state' renamed to 'published', etc.

-- hugh
 
Hugh,

I checked the "elements" tables and they still show "state" and "attribs".

It would appear that the upgrade script has not been processed. Even though it is saying that it has when I click the link under tools.

--Justin
 
I have been working on this for a day now so I could create a proper sticky.

First of all, although I thanked the original poster for their experience I have decided that I'm not over that keen on JUpgrade. The principle is nice but it causes confusion and a couple of issues for a product like Fabrik.

A slightly manual approach is the preferred way for me and I will provide clear instructions on how to do this. It is actually quite straight forward.


However with that said there does appear to be some issues coming up.

Something in the script isn't working correctly for the upgrade but I am working on it so will update when I've worked out what is going on.

.
 
Code:
foreach ($sql as $q) {
            echo $q;
            if (trim($q) !== '') {
                if (!$db->query()){
                    JError::raiseNotice(500, $db->getErrorMsg());
                }
            }
            [B][COLOR=Red]$db->setQuery($q)[/COLOR][/B];
        }
    }


Adding $db->setQuery($q); around line 135 in \administrator\components\com_fabrik\models\upgrade.php seems to fix the problem.


The array of mysql statements where running through the loop but nothing was actually executing them.

My site is doing better things now so I'll try the upgrade from scratch again, with the modified file, and will update when done.

.
 
A seperate issue after the upgrade.


HTML:
Notice:  Undefined property: stdClass::$sub_values in Z:\Web\wamp\www\dev\oprtest\components\com_fabrik\models\element.php on line 1943

Notice:  Undefined property: stdClass::$sub_labels in Z:\Web\wamp\www\dev\oprtest\components\com_fabrik\models\element.php on line 1950


EDIT:- Ignore this one for the moment.....

2nd EDIT:- Red herring, this is working okay, but did involve me having to re-save a dbjoin. Strange though as table.. ahem list had 3 dbjoins and only one was causing the issue.


3rd and final EDIT:- RE: Edit 2, re-saving the dbjoin inserts the correct sub_value and sub_label information for the element. In Fab 2.x this is in the attribs but is dropped as a part of the script. The script is failing to add the new JSON? bit something I have posted later in this thread.


.
 
I was able to get my database updated to 3.x by running the script in /administrator/components/com_fabrik/sql/updates/mysql/2.x-3.0.sql via phpMyAdmin.

There was an error in the script on the last line though:
Code:
ALTER TABLE 'j17_fabrik_ratings CHANGE `tableid` `listid` INT( 6 ) NOT NULL;

Should have been:
Code:
ALTER TABLE `j17_fabrik_ratings` CHANGE `tableid` `listid` INT( 6 ) NOT NULL;

Also, the script is missing a line for the connections table, so add:
Code:
ALTER TABLE `j17_fabrik_connections` CHANGE `state` `published` INT( 1 ) NOT NULL DEFAULT '0';

Now, everything seems to be working on the backend, but when I link to and try to view the lists all I get is blank layouts. Then when I try to click into view the details of the entry it only has the Submit button?? The data is still in the mysql database, and everything appears to be setup properly...
 
Thanks for your input, yes I spotted the errors on the script and changed them by hand. These were put into Github a couple of days ago, which was actually after your initial post.

I had endless problems with the JUpgrade route though, one of the main problems was the discovery service not working. I couldn't discover nor install any of the additional Fabrik plugins. I'll take another look at some point but for now I'm focusing on the clean install migration.

I think I have discovered a couple of other issues so I'm looking at those at the moment.

Hopefully have an update later.

.


.
 
This is one of the first things I'm going to ambush Rob about when he gets back in the saddle.

We need to get our upgrade script copacetic with JUpgrade.

-- hugh
 
This is one of the first things I'm going to ambush Rob about when he gets back in the saddle.

We need to get our upgrade script copacetic with JUpgrade.

-- hugh

Agreed, however I think initially we should focus on getting the script to work with a clean upgrade, i.e fresh install of J! and migrating the Fab 2.x tables across.

Once this is working cleanly it'll make debugging any JUpgrade issues easier.

I'm currently writing the instructions for a clean migration but debugging as I go through. :)

.
 
Friendly Bump.

Still have not been able to figure out why I can not view any of the data in the "lists". The records are there, they are just empty??? The data is still in the mysql database?
 
The github version seems to be making it worse.... when trying to view a table from the backend I now get:

Code:
getData:Unknown column 'j17_users.UserID' in 'field list' SQL=SELECT  SQL_CALC_FOUND_ROWS DISTINCT `fab_trailconditions`.`fabrik_internal_id`  AS `fab_trailconditions___fabrik_internal_id`,   `fab_trailconditions`.`fabrik_internal_id` AS  `fab_trailconditions___fabrik_internal_id_raw`,   `fab_trailconditions`.`time_date` AS `fab_trailconditions___time_date`,    `fab_trailconditions`.`time_date` AS  `fab_trailconditions___time_date_raw`,   `fab_trailconditions`.`Important` AS `fab_trailconditions___Important`,    `fab_trailconditions`.`Important` AS  `fab_trailconditions___Important_raw`,   `fab_trailconditions`.`TC_NoteTop` AS  `fab_trailconditions___TC_NoteTop`,   `fab_trailconditions`.`TC_NoteTop` AS  `fab_trailconditions___TC_NoteTop_raw`,   `fab_trailconditions`.`First_Name` AS  `fab_trailconditions___First_Name`,   `fab_trailconditions`.`First_Name` AS  `fab_trailconditions___First_Name_raw`,   `fab_trailconditions`.`Valid_Email` AS  `fab_trailconditions___Valid_Email`,   `fab_trailconditions`.`Valid_Email` AS  `fab_trailconditions___Valid_Email_raw`,   `fab_trailconditions`.`Date_at_Location` AS  `fab_trailconditions___Date_at_Location`,   `fab_trailconditions`.`Date_at_Location` AS  `fab_trailconditions___Date_at_Location_raw`,   `fab_trailconditions`.`Zone` AS `fab_trailconditions___Zone`,   `fab_trailconditions`.`Zone` AS `fab_trailconditions___Zone_raw`,   `fab_trailconditions`.`Other_Area` AS  `fab_trailconditions___Other_Area`,   `fab_trailconditions`.`Other_Area` AS  `fab_trailconditions___Other_Area_raw`,   `fab_trailconditions`.`Trail_Name` AS  `fab_trailconditions___Trail_Name`,   `fab_trailconditions`.`Trail_Name` AS  `fab_trailconditions___Trail_Name_raw`,   `fab_trailconditions`.`Type` AS `fab_trailconditions___Type`,   `fab_trailconditions`.`Type` AS `fab_trailconditions___Type_raw`,   `fab_trailconditions`.`Description` AS  `fab_trailconditions___Description`,   `fab_trailconditions`.`Description` AS  `fab_trailconditions___Description_raw`,   `fab_trailconditions`.`Picture_Upload` AS  `fab_trailconditions___Picture_Upload`,   `fab_trailconditions`.`Picture_Upload` AS  `fab_trailconditions___Picture_Upload_raw`,   `fab_trailconditions`.`Zone_Map` AS `fab_trailconditions___Zone_Map`,   `fab_trailconditions`.`Zone_Map` AS  `fab_trailconditions___Zone_Map_raw`,   `fab_trailconditions`.`Note` AS `fab_trailconditions___Note`,   `fab_trailconditions`.`Note` AS `fab_trailconditions___Note_raw`,   `fab_trailconditions`.`Approved` AS `fab_trailconditions___Approved`,   `fab_trailconditions`.`Approved` AS  `fab_trailconditions___Approved_raw`,   `fab_trailconditions`.`UserID` AS `fab_trailconditions___UserID_raw`,   `j17_users`.`UserID` AS `fab_trailconditions___UserID`,   `fab_trailconditions`.`fabrik_internal_id` AS slug  , `fab_trailconditions`.`fabrik_internal_id` AS `__pk_val`  FROM `fab_trailconditions`   LEFT JOIN `j17_users` AS `j17_users` ON `j17_users`.`id` =  `fab_trailconditions`.`UserID`       ORDER BY `fab_trailconditions`.`fabrik_internal_id` DESC LIMIT 0, 5
 
Try checking and re-saving your joins and any element dbjoins.

Couldn't say if it will work but it's the first thing I look at when I get the 'unknown' type of errors.
 
Everything seems to be correct with the joins.

I have now updated to the latest github version as of this post and am now getting:

Code:
[B]500 - An error has occurred.[/B]

 				Unknown column 'e.params' in 'field list' SQL=SELECT *, e.name AS  name, e.id AS id, e.published AS published, e.label AS label, e.plugin,  e.params AS params, e.access AS access, e.ordering AS ordering FROM j17_fabrik_elements AS e INNER JOIN j17_extensions AS p ON p.element = e.plugin WHERE group_id IN (16,48,17,42,18,43,19,44,20,45,21,46,22,47,23,40) AND  p.folder = "fabrik_element" AND e.published != -2 ORDER BY group_id, e.ordering


I really like fabrik because it makes simple changes much much easier, and the email features are much nicer than my programing skills. But if I am unable to get this working soon I will have to resort to rebuilding all my tables and forums by hand as I am reaching a deadline to put the test site live so I can get the main site updated in time for the next hiking season.


Am I the only one having these problems?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top