Panel
Expert
Vanbells
+3 votes
Suggest 525 views

Q2A to PQA Coneverter. How should it be done? Lets discuss

In the near future,

It will be useful to have a seamless way for Q2A users to transfer to PQA

Say we make a plugin that does this automatically

1. Manually back up your old q2a installation or let the plugin do it??

2. Extract PQA files to the installation folder. // done manually

3. Copy qa-config from q2a to pqa installation folder.  //done manually

4. Check qa-config values of q2a and set  the pqa equivalent values //done manually

5 Now the DATABASE (We want pqa to connects to q2a database that already contains q2a data from a real site)

 a. Change db prefix to pqa-config value??

 b. Create new pqa tables that is not present in q2a??

 c. Modify tables that have been changed in pqa??

 d. Optimize table and get rid of old cache??

 

The Converter's aim is to convert an existing q2a instance to pqa with all the q2a data intact and working.

This is supposed to make it easy for any q2a user to transition to pqa in a couple of minutes without hassle

 

Please lest disscuss this issue.

1.Do you think it is necesaary?

2.Do you think it is possible?

4.Should it be done?

5.Do you have a better way?

 

Regards

Vanbells

by Vanbells asked Oct 28, 2015 in Plugins
by Vanbells edited Oct 28, 2015

Please log in or register to add a comment.

Please log in or register to answer this question.

6 Answers

Fighter
webmaster
+2 votes

Yeah, I also was thinking Migration test. Database of PQA V1.0 has been changed from Q2A V1.7.1. However, I raised the database version from "59" to "60". Refer to qa-include/install/qa-db-install.php in details.

Migration procedures:

  1. Backup your database and all of source files (Important!!)
  2. Overwrite all PQA files to your Q2A folder
  3. Remove qa-config.php
  4. Rename qa-config-exampe.php to qa-config.php
  5. Edit qa-config.php

    define('QA_MYSQL_HOSTNAME', '127.0.0.1');
    define('QA_MYSQL_USERNAME', 'your-mysql-username');
    define('QA_MYSQL_PASSWORD', 'your-mysql-password');
    define('QA_MYSQL_DATABASE', 'your-mysql-db-name');
    define('QA_MYSQL_TABLE_PREFIX', 'qa_');
    define('QA_SAFE_MODE', true);
    And, set other options from backuped qa-config.php
    You can not use "EXTERNAL_USERS" in PQA. So, Don't set True to "QA_EXTERNAL_USERS" and "QA_FINAL_EXTERNAL_USERS".
     
  6. Access your site
     
  7. Go to admin panel and Click "ugraded"
  8. Click "Ugrade the database"
  9. Your database upgraded!
  10. Go to "admin" > "General"
  11. Change "Sub title"
  12. Change theme and mobile theme to "Base"
  13. Go to "admin" > "Layout"
  14. Set "Site icon" (This is option).
  15. Go to "admin" > "Points"
  16. Click "Show Defaults"
  17. Click "Save and Recalculate"
     
  18. Go to "admin" > "Plugins"
  19. Enable all plugins
  20. Disable (Remove) unnecessary plugins

    Note: Disable existing plugins that compatibility is not tested in PowerQA.
  21. Restore QA_SAFE_MODE in qa-config.php to false
  22. Go to "Admin"
  23. Database update of newly enabled plugins may be required. e.g. Database Manager Pro, Point Trade Pro, etc. In this case, please upgrade database follow the instructions on screen.
  24. Go to "Admin" > "Posting"
  25. Select CKEditor in "Default editor for questions" and "Default editor for answers"
  26. Go to "Admin" > "Layout"
  27. Add newly added widget. e.g. "Post type", "Question Followers Widget", "Tag Followers Widget", "Tag Search Widget", "User Followers Widget", "User Search Widget"

All done!

image

by webmaster answered Oct 28, 2015
by webmaster edited Oct 31, 2015

1 Comment

I will test your upgrade procedure and confirm it

Please log in or register to add a comment.

Expert
Vanbells
+2 votes

I tested your migration procedure.

It worked 90% with a small issue.

Point Trade Pro Plugin did not undergo any database innitialization.

Due to that, that an error was generated

[29-Oct-2015 09:53:31 Europe/Berlin] PHP PowerQA MySQL query error 1054: Unknown column 'bountystarted' in 'field list' - Query: SELECT postid, userid, UNIX_TIMESTAMP(bountystarted) AS bountystarted, bountyuserid, bountypoint, bountymessage, UNIX_TIMESTAMP(bountyearned) AS bountyearned, bountyearneduserid, bountyearnedpoints FROM posts WHERE type = 'A' AND parentid = 31032 AND bountyearnedpoints != 0

Because of the above failed query associated with point trade pro,

the answers did not appear after migration.

See screen shot below

I think maybe pointrade pro should be initialized to create its tables just as the database manager pro did.

Once this is fixed, Migration will be very easy. It is the only issue left

If I disable Point Trade Pro, Everything works 100%

Thanks

by Vanbells answered Oct 29, 2015

6 Comments

I have discovered a way for point trade pro to work after migration.
see new answer below
Originally, this error should not be displayed. So I will improve the program.
Great thanks.
In my test, this error did not reproduced. My migration procedure is different with you?
http://www.powerqa.org/qa/383/q2a-to-pqa-coneverter-how-should-it-be-done-lets-discuss?show=385#a385
The issue was that i did not initialize the point trade pro plugin so the answer pages were generating the above error. I have since fixed it by initializing the point trade pro database. see improved procedure below
This issue reproduced in my environment. I will investigate it. Thanks.
This issue fixed.

Please log in or register to add a comment.

Expert
Vanbells
+2 votes

After testing, the following procedure is to be followed to convert q2a to pqa

Migration procedures:

  1. Overwrite all files (qa-config.php included)
  2. Edit qa-config.php
        define('QA_MYSQL_HOSTNAME', '127.0.0.1');
        define('QA_MYSQL_USERNAME', 'your-mysql-username');
        define('QA_MYSQL_PASSWORD', 'your-mysql-password');
        define('QA_MYSQL_DATABASE', 'your-mysql-db-name');
        define('QA_MYSQL_TABLE_PREFIX', 'qa_'); (this prefix should be the same prefix used in    your q2a config.php)
        define('QA_SAFE_MODE', true);
  3. Access your site
  4. Go to admin panel
  5. Database upgrade page should be displayed.
  6. Upgrade database
  7. Go to "admin" > "General"
  8. Change theme from "Snow/SnowFlat" to "Base"
  9. Go to "admin" > "Plugins"
  10. Enable plugins
  11. Go to "admin" > "Plugins" > "Point Trade Pro" > "Present" and click save, a database innitialization prompt will appear. click to innitialize dtabase.
  12. Go to "admin" > "Plugins" > "Point Trade Pro" > "Bounty" and click save, a database innitialization prompt will appear. click to innitialize dtabase.
  13. Restore QA_SAFE_MODE to false
  14. Access your site again

This has been tested on a q2a site with large data.

Please report any problems here

Thanks

by Vanbells answered Oct 30, 2015

Please log in or register to add a comment.

Fighter
webmaster
+1 vote

I found one problem. After enabling plugins, editor selector is not displayed in "Admin" > "Posting" tab. I will investigate it.

image

by webmaster answered Oct 31, 2015

2 Comments

I got it. In SAFE_MODE, plugins are not loaded. Therefore, you can not select these options. This behavior is correct. I learned a great program of Gideon again. His program is really great!
yes Gideon really is a genius

Please log in or register to add a comment.

Fighter
webmaster
0 votes

Error is displayed in snow / snowFlat after releasing the safe mode.

Fatal error: Call to undefined method qa_html_theme_base::nav_user_search() in Z:\www\q2a1712\qa-theme\Snow\qa-theme.php on line 30

This is caused in my removing of existing function (nav_user_search) in qa-include/qa-theme-base.php. I will fix it.

image

by webmaster answered Oct 31, 2015

5 Comments

This issue fixed by adding dummy functions in qa-theme-base.php.
header_clear()
nav_user_search()
nav_main_sub()
another common function used in a lot of themes are
 header_custom()
footer_clear()
You can add these functions to the qa-theme-base.php to increase compatibility
header_custom():
This is head_custom()? If so, head_custom exists in Base theme.
footer_clear():
added.
Thanks
I just noticed head_custom() already exist
Some dummy functions to avoid compilation errors of existing plugins / themes added in qa-theme-base.php. These functions exist in last of qa-theme-base.php. In particular, *_clear functions are old style mark up for clearing float.

public function header_clear() {
}
public function footer_clear() {
}
public function nav_user_search() {
}
public function nav_main_sub() {
}
public function nav_clear($navtype) {
}
public function q_item_clear() {
}
public function vote_clear() {
}
public function page_links_clear() {
}
public function q_view_clear() {
}
public function a_item_clear() {
}
public function c_item_clear() {
}

Please log in or register to add a comment.

Fighter
webmaster
+1 vote

Plugins have been changed significantly.

  • Several plugin performance has been improved.
  • Prefix ("pqa-") was attached to all of plugins folder. By this change, when you overwrite PQA to Q2A V1.7.1, all of existing plugin will remain. If existing plugin is compatible with PQA, you will be able to use favorite one.

image

by webmaster answered Nov 5, 2015

3 Comments

I think this is a brilliant idea
procedure mentioned in this QA thread will work with q2a v180?
I have not tried it.

Please log in or register to add a comment.

Welcome to PowerQA. PowerQA is a new discussion software (not OSS). Here is a community for PowerQA developers. Current stable version is V1.9.4. It is enhanced day by day.

User ranking (month)

More ...

Followers

2 users followed

Statistics

  • 337 questions
  • 276 answers
  • 480 comments
  • 97 users

Post types

...