I have successfully upgraded from Elgg version 1.9 to version 2.
I did a step by step upgrade , specifically : 1.9 > 1.10
then 1.10 > 1.11 then 1.11 > 1.12 and finally 1.12 to 2.0.4
In all the 1.* upgrade steps I encountered no problems.
I am aware that since Elgg version 2, "Discussions" are a separate plugin and is not bundled with groups. Therefore after the upgrade I went to the plugins dashboard and enabled the 'Discussions' plugin.
My problem is that now all my groups discussion topics are gone. When I visit each groups discussions page I see a "No discussions" message.
Adding new topics seems to work fine. All other group content is there in my groups (files, news, pages, etc).
I checked the php and apache logs for errors but found nothing.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- iionly@iionly
iionly - 0 likes
- Jok Iopas@nafnaf
Jok Iopas - 0 likes
- iionly@iionly
iionly - 0 likes
- Jok Iopas@nafnaf
Jok Iopas - 0 likes
You must log in to post replies.You should have run 'Upgrades' (admin/upgrades) after each update.
Apart from the upgrade.php script (that you can either call in the browser by the url yoursite.url/upgrade.php or execute by clicking on the "Upgrade" button on the admin dashboard page in the admin area) that only deals with the short-running upgrade tasks there is also the additonal "Upgrade" page (corresponding menu item in the "Configure" section in the admin area sidebar menu) that deals with long-running upgrade jobs. Have you executed any pending upgrades listed on this page?
If you started from Elgg 1.9 the only long-running upgrade job is likely the upgrade of discussion entries. Only if you would have upgraded from 1.8 to 1.9 there would have been more already pending on Elgg 1.9. So, just check if you see a pending upgrade on the "Upgrade" page in your admin section and execute it (it won't hurt doing a db backup before just to be on the safe side).
If you intent to upgrade further from Elgg 2.0 to 2.3 you can do that directly without first upgrading to 2.1 and 2.2. It would have been possible to upgrade from 1.12 to 2.3 directly even. One more pending upgrade should show up when upgrading to 2.2 (or 2.3) but otherwise there shouldn't be any other long-running upgrades waiting.
@iionly
Thanks for the detailed answer. I am quite sure I followed all the instructions for the upgrade procedure as stated in this page. Now and when I go to the "Upgrade" page (corresponding menu item in the "Configure" section in the admin area sidebar menu) I see a "Your installation is up to date!" message.
In any case I solved the problem by performing this SQL query
In my particular case this updated the entities table and changed the entity subtype from "groupforumtopic" to "disucssion". I don't recommend it for anyone else as the number IDs will be different.
I am sure the yoursite.url/upgrade.php script performs a similar update function, I really don't know what might have gone wrong in my case as I ran it each time I went from version to version.
All is good now , the topics are back, so I am happy. Thanks again for answering, you are one of the few users in this forum who provides detailed and thorough tips when it comes into solving problems.
I've looked into the upgrade scripts that are included in version 2.0.4. There no async upgrades (which would have to be executed from the "Upgrade" page manually) but there's a script at vendor/elgg/elgg/engine/lib/upgrades/2015062900-1.11.2-discussion_plugin-e28c7afa4f5f24ec.php which should have run when calling yoursite.url/upgrade.php (or clicking on the "Upgrade" button on the admin dashboard).
I don't know why it hasn't been correctly executed on your site when upgrading to 2.0.4. Could it be that you enabled the Discussions plugin before running upgrade.php? In this case there might have been a new row added to the subtype db table (for discussion subtype) and the upgrade script might not have been able to update the existing row for the groupforumtopic subtype in the subtype table.
As you see in the upgrade script the approach is slightly different from what you have done to fix the problem on your site: instead of updating the subtype id in the entities table to match the discussion subtype's id the existing groupforumtopic subtype is changed to the discussion subtype in the subtype table instead.
I guess if you now have already changed the id in the entities table the first db update done in the upgrade script would be no longer necessary to be executed. But as you see in the script, there are two more updates done: river entries and log table entries. The log table entries might not be that important as the log table would sooner or later get cleaned up by the logrotate plugin anyway. But I think you should fix the river table entries in any case as they would point to a non-existing view otherwise and would have the wrong subtype (groupforumtopic instead of discussion). The last part of the script would only enable the Discussions plugin. But as you have it already enabled that part is not relevant anymore.
I have no idea why vendor/elgg/elgg/engine/lib/upgrades/2015062900-1.11.2-discussion_plugin-e28c7afa4f5f24ec.php was not executed. Like you said it is possible that I enabled the discussions plugin before running upgrade.php but I doubt it as running upgrade.php was a routine thing to do immediately after the step by step, one version at a time, manual updates.
Following your tip and looking into the code of the upgrade script I performed this SQL query:
Now the activity entries relating to discussions are displayed correctly in the activity page of the site.
I chose not to update the log table as it did not matter much.
Thanks again for your help with this.