This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jacksun
jacksun

PHP 5.x October Version 419

Hello, I just updated the User Plugin to v1.4.5 from v1.3.4, and then bad things happened to the frontend. Yes, I know it's my bad. I should not have done that. Any idea how to get User Plugin rollback to 1.3.4? I need to get my frontend back asap. Thanks.

AlanQ
AlanQ

Hi @jacksun

I've never had to do this but, in theory, it should work.
I haven't tested this, so proceed with caution! Try it on your development site first!
Backup your website including your database!

Note: It would probably be easier to persuade your hosting provider to upgrade to PHP7.0 so you can use the latest version on OctoberCMS. But, if you must have User 1.3.4...

You can get the old version from RainLab's GitHub repository:
From https://github.com/rainlab/user-plugin/, click on the 'Commits' link -- currently '479 Commits'.
Scroll down until you find:

Commits on Dec 15, 2016

@daftspunk

1.3.4: Added force secure protocol property to the account component.

daftspunk committed on 15 Dec 2016

Click on the adjacent SHA hash: ...e78b588...
Click the green 'Clone or Download' button and choose 'Download ZIP'. You now have a zipped copy of version 1.3.4 of the code.

Backup your website including your database!
Delete the user plugin code on your site and replace it with the unzipped download.

Looking at the version.yaml file, there is nothing to suggest that there are any database changes between version 1.3.4 and 1.4.5 . So, you might well now be good to go!

If not, you'll need to teardown the tables and re-populate them:
In /plugins/rainlab/user/updates you'll find the files which create the tables.
By comparing the files for each version you can first see if there are any new tables, and then compare each pair of files to see what changes there are.
At this point it's worth preparing copies of the old tables -- with suitable modifications -- to put into the database after you have refreshed the plugin...

https://octobercms.com/docs/console/commands#plugin-refresh-command

plugin:refresh - destroys the plugin's database tables and recreates them. This command is useful for development.

php artisan plugin:refresh AuthorName.PluginName

So, in the root of your website, at the command line, type php artisan plugin:refresh rainlab.user

Now re-populate the database tables...

Good luck

jacksun
jacksun

@AlanQ, thank you so much for your time and effort to answer my question. I will try and feedback later.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.