News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Softaculous upgrade 2.1.3 to 2.1.4 removed formatting for topics - left aligned

Started by FOP, August 05, 2023, 10:57:32 AM

Previous topic - Next topic

FOP

First, a compliment. I have used SMF and have been a consumer of the support forum for over a decade. This is a tremendous compliment to the developers, admins, and moderators behind SMF. SMF has always worked and delivered on it's promises to date.

Symptoms:
 - The formating for all topics has been removed and is now left-aligned black on white text with hyperlinks.
 - all hyperlinks on the topics return error 403 (not authorized)
 - package manager install/uninstall attempts fail with on screen in error loop

Steps to recreate:
 - Was notified of upgrade available
 - proceeded to host Softaculous to b/u & install 2.1.3 to 2.1.4 upgrade.
 - install process was normal, forum appeared to be normal (format, menus, login, boards) at first
 - followed instructions to complete upgrade by removing the upgrade package using the check box on the last page of the installer sequence.
 - proceeded to forum to login and review the upgrade installation. This is when I discovered the symptoms above.

Recovery Actions to date:
 - reviewed the support forum.
 - downloaded and installed large upgrade package (same installation steps as above)
 - ran the repair_settings.php (no effect on the issue)
 - ran the compare_database.php (discovered one RED  line in the report
 - It's at the bottom of page 19/24 (searchable PDF attached)
   table smf_boards/idx_member_groups is blank
 - full report split into three files (p01-08, p09-18, p19-24)

Owner skill level and experience = low and slow ;-)

Host = Host Papa
SMF version = 2.1.4 (with issues stated above)
MySQL serve = 5.7.43, protocol 10
Softaculous = 6.0.0

Looking for the most efficient way to recover the forum



Doug Heffernan

Quote from: FOP on August 05, 2023, 10:57:32 AMFirst, a compliment. I have used SMF and have been a consumer of the support forum for over a decade. This is a tremendous compliment to the developers, admins, and moderators behind SMF. SMF has always worked and delivered on it's promises to date.

Thank you :)

Quote from: FOP on August 05, 2023, 10:57:32 AM- proceeded to host Softaculous to b/u & install 2.1.3 to 2.1.4 upgrade.

Such updates/upgrades have been known to cause issues. For future reference, small updates, the ones within the same serie/branch such as in your case, are best done by applying the patch in the Admin Panel. Whereas large upgrades are best done manually. For more please see this link:

Upgrading SMF

Quote from: FOP on August 05, 2023, 10:57:32 AMSymptoms:
 - The formating for all topics has been removed and is now left-aligned black on white text with hyperlinks.
 - all hyperlinks on the topics return error 403 (not authorized)
 - package manager install/uninstall attempts fail with on screen in error loop

Quote from: FOP on August 05, 2023, 10:57:32 AMtable smf_boards/idx_member_groups is blank

Most likely all these issues have been caused by the update method. Because doing the updates/upgrades the recommended way don't cause loss of data.

Do you have a backup? If you do, restore the aforementioned tables that are blank, then download the large 2.1.4. upgrade package, unzip it and remove the upgrade.php and the upgrade sql files. Then upload its contents to the root of your forum folder inside the server and see if it would help.

Can you load your admin panel? If you do, are there any errors logged in the error log page? What about the Server Error Log page, are any errors logged in there?

FOP

Interesting. I've always used the Softaculus for original install and updates. (10 years+)

I don't believe it's just missing a few files due to the red line shown in the database_compare.php report shows the table smf_boards is not only missing one field, but also missing the multiple expected 2.1.4 indexes too.
This implies to me that there may be an issue with the SQL file not completing during install. The topic hyperlinks 403 error (permissions related)

This Error log only shows the errors following the 2.1.4 upgrade. Nothing before for comparison.
The error log entries captured are related to failed attempts to unistall/install add-on packages (via package manager). Notice the USER is recorded as GUEST, but was logged in as Administrator when those actions were performed.

Can the database error in smf_boards table be corrupting permissions?

Reminder that I ran the full large update for 2.1.4 (the second install) and it too, didn't correct the smf_boards table multiple indexes or missing field.

Both methods of installing the update (softaculous (1st) & update.php (2nd)) have been performed.

Kindred

You should always use OUR patch method, not Softaculous. Really.

At this point,  I suggest restoring your backup and doing the upgrade the right way,  with a patch in the package manager
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

FOP

Took your advise and restored from backup.

Bad news (for me), the 2.1.3 -> 2.1.4 upgrade was somehow overwritten with the second attempted 2.1.4 large upgrade.

I'm not able to restore to the pre-upgrade, 2.1.3 install.
 
Are there any tools already written to export users, boards, & topics for migration to new clean install of 2.1.4?

FOP

Doug Heffernan: I forgot to mention that the 2.1.4 files were refreshed using the instructions in
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
This did not address the left-aligned text and 403 errors @ the Topics level pages.

ding!: The large upgrade 2.1.4 was the last upgrade installed. During that upgrade, all the checkbox options were seleted - including backup
Where does the SMF upgrade.php save the backups? I may not be looking in the right location.

Kindred

The files don't matter. A clean set of files is clean...  what matters is the database.

And no, you can not just export parts and make it work.


Did you not take a backup of your database before the upgrade?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Doug Heffernan

Quote from: FOP on August 05, 2023, 11:17:46 PMDoug Heffernan: I forgot to mention that the 2.1.4 files were refreshed using the instructions in
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
This did not address the left-aligned text and 403 errors @ the Topics level pages.

ding!: The large upgrade 2.1.4 was the last upgrade installed. During that upgrade, all the checkbox options were seleted - including backup
Where does the SMF upgrade.php save the backups? I may not be looking in the right location.

If the Softaculous upgrade has removed fields from the database the only way to get your forum back up and running is as suggested above, to restore your most recent backup from before the upgrade. If you haven't made a backup of the database yourself before the upgrade, you can ask your host if they have a recent working backup of your database.

FOP

I used the backup feature offered by the installer(s) when each of upgrades were launched.
One was done during the softaculus installation method.
Then again when the large uprade was run using the forum/upgrade.php
I should have at least two backups of both 2.1.3 and 2.1.4. One by Softaculus, one by SMF - Correct?

When I went to restore from the Softaculus backup/restore tool displays the backup is v2.1.4.  Which was the second backup performed by SMF large upgrade.php (not the original 2.1.3).

The package manager also has a backup folder path, but only contained b/u for the 2.1.3 pre add-ons.
I was trying to determine where else a backup may be hidden on the server. The requested restortation performed.  At this time I've only found a single dated backup of v2.1.4 - Doesn't the SMF create separate date-time stamped B/U's each time it's run?

That's why I requested help with identifying the location(s) used by SMF when the upgrades are run.
I admit that my assumptions are the issue, but I don't understand why I haven't found dated-time stamped b/u's for each of the 2.1.4 upgrade attempts.

Doug Heffernan

Quote from: FOP on August 06, 2023, 09:15:46 AMI used the backup feature offered by the installer(s) when each of upgrades were launched.
One was done during the softaculus installation method.
Then again when the large uprade was run using the forum/upgrade.php
I should have at least two backups of both 2.1.3 and 2.1.4. One by Softaculus, one by SMF - Correct?

I don't know about the backups made by the softaculus, but if you selected the backup options prior to running manually the upgrade.php, the backup tables should be prefaced with the backup_ prefix in the database. Do you have such tables in the database?

Quote from: FOP on August 06, 2023, 09:15:46 AMThe package manager also has a backup folder path, but only contained b/u for the 2.1.3 pre add-ons.

That is not revelant for what we are trying to do, which is the restore of your most recent database backup done before the upgrade. The package manager will backup the smf files which are affected by the mod installation. i.e. it will backup the files only and not the database.

Kindred

Just FYI- never rely on automated backups. You should be regularly (as in, at least once a week, if not once a day) be taking a backup of your database and at least once a week of your files.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

If you're using a decent host you should have a backup utility in your control panel (Acronis, JetBackup, something similar) that saves 30 day backups of your account.  That would enable you to restore the files and/or database to a previous date prior to Softaculous trashing the database.
When in Emor, do as the Snamors.
                              - D. Lister

FOP

To summarize:
I do have the tables prefixed with "backup_". Since the upgrade was run twice. Once by Softaculus (2.1.3 to 2.1.4), once by large upgrade (2.1.4 botched to 2.1.4 botched).  A comparison of the backup tables is needed to determine which version is backed up (2.1.3 or 2.1.4).

I was incorrectly searching the server folders for a time-date stamped backup archive (gz) created by the large smf upgrade. If your telling me that does not exist, the only options left would be a possible host backup or recreating forum from scratch.

Questions:
Are there SMF tools used to restore from the smf upgrade backup_?
I'm trying to clarify the SMF upgrade backup feature.
     Does it provide a full time-date stamped backup of the full forum files and database? Yes / No
     Does it overwrite any existing 'backup_' prefixed tables?

I incorrectly assumed that when offered a 'backup' and 'backup tables' that it was done the way I would have done it with unique time-date stamps. Shame on me. It was a good bumpless run for a decade, but no more.

Only trying to determine all available paths forward.

FYI:
Lots of other posts about being unable to install mods and receiving the "error loop". I have those issues too. These appear to be variations of my 2.1.4 upgrade experience.
                  "https://www.simplemachines.org/community/index.php?topic=586522.0"
                   "https://www.simplemachines.org/community/index.php?topic=586471.0"
This implies a potential bug in the 2.1.4 upgrade package because the 3rd-party variable is removed.
The 2.1.4 upgrade is losing data for multiple users

Thanks again


Doug Heffernan

Quote from: FOP on August 07, 2023, 07:32:08 AMAre there SMF tools used to restore from the smf upgrade backup_?

No, there is not. You can restore a database backup through phpmyadmin, but if the backup file is of medium size or large, that might result in incomplete restoration as almost all hosts do have file zise limits for phpmyadmins on their server. In that case it is best to use another tool, such as bigdump for example.

But in this case, assuming that the backup tables made by the upgrader are in good condition, no restoration is needed. All you have to do is update the prefix value at the Settings.php file to reflect the backup_ tables.

Quote from: FOP on August 07, 2023, 07:32:08 AMI'm trying to clarify the SMF upgrade backup feature.
     Does it provide a full time-date stamped backup of the full forum files and database? Yes / No

No. It will not make a backup of the forum files. That should be done manually. And the database backup that it does, it is not stored in the server with a time stamp. All it does is prefixing the tables with the backup_ prefix in the database as mentioned previously.

Quote from: FOP on August 07, 2023, 07:32:08 AMDoes it overwrite any existing 'backup_' prefixed tables?

No, I don't think so.

Sir Osis of Liver

Just to clarify, when you do a package manager update it creates a backup zip in /Packages/backups/ before installing the patch, which (iirc) includes /Sources, /Themes, and root files.  It does not backup the database.  If you use the upgrade package, upgrade.php displays an option to create backup tables, which is enabled by default.  It will copy all tables with backup_ prefix.  It does not backup files.

Quote from: Doug Heffernan on August 07, 2023, 08:00:43 AM
Quote from: FOP on August 07, 2023, 07:32:08 AMAre there SMF tools used to restore from the smf upgrade backup_?
Does it overwrite any existing 'backup_' prefixed tables?

No, I don't think so.

That's an interesting question.  Wouldn't think mysql will allow that.
When in Emor, do as the Snamors.
                              - D. Lister

Doug Heffernan

Quote from: Sir Osis of Liver on August 07, 2023, 12:54:14 PMJust to clarify, when you do a package manager update it creates a backup zip in /Packages/backups/ before installing the patch, which (iirc) includes /Sources, /Themes, and root files.

It doesn't include everything in the backup. It includes only the files that are affected by the upgrade.

Advertisement: