Can't install mods after upgrade from 2.0.19 to 2.1.4

Started by hustreamload, July 21, 2023, 11:53:29 AM

Previous topic - Next topic

shawnb61

Quote from: Sir Osis of Liver on July 23, 2023, 01:26:48 PMWould be interesting to get hands on the original 2.0.19 database and see if problem can be replicated on different server.  If it had only been reported once good bet it's a broken install, but it's now been reported twice and may be an obscure glitch in the upgrader.

The other one was a 2.1.3 => 2.1.4 patch, though.  No upgrader involved.

I'm still curious to see what mods were installed before the upgrade.

A question worth asking is born in experience & driven by necessity. - Fripp

Sir Osis of Liver

Hooks?  Maybe upload clean files and remove hooks before reinstalling mods.

When in Emor, do as the Snamors.
                              - D. Lister

hustreamload

These mods were installed on 2.0.19

Tinyportal
(Eralier: SimplePortal)
Simple Audio Video Embedder
nCode Image Resizer
Hide Images From Guests
Hide the content of code tags from guests
Hide Signatures from Guests
Disable 'last edit by....' for Administrators
Login Security
Stop Forum Spam
CleanTalk
Custom buttons
Search Focus Dropdown
Users Online Today
Board Viewers
Language Dropdown
Alternate User Posting
Copy Topics
Facebook Video BBC
Soundcloud BBcode

maybe 2-3 more :)

hustreamload

Quote from: Sir Osis of Liver on July 23, 2023, 01:26:48 PMWould be interesting to get hands on the original 2.0.19 database and see if problem can be replicated on different server.  If it had only been reported once good bet it's a broken install, but it's now been reported twice and may be an obscure glitch in the upgrader.

It was already done: in reuploaded 2.0.19 clean version everything ran properly

hustreamload

Quote from: shawnb61 on July 23, 2023, 10:07:04 AM...
At this point, I don't think we need to rebuild the db.  We may want to reload a fresh set of files, though.  Doing so you'd need to reload mods.

As earlier I wrote, I have reupped the old db with a clean 2.0.19, tested the mods availability (see my post before), and then I made on the "clean" 2.0.19 an upgrade...but the bug remained.

Thanks

hustreamload

Quote from: Sir Osis of Liver on July 23, 2023, 02:35:01 PMHooks?  Maybe upload clean files and remove hooks before reinstalling mods.



Sorry, what does it mean practically? Pls step by step (see my last 2 post before).

Thanks

hustreamload

It would be easier, if I shouldn't close the forum during this repair process...but I dont know, how to upload the old DB with the old home directory parallel with the living db. I have made  already a clean upload with a clean DB earlier (www.myforum/pilot), but not with the same DB

hustreamload

#47
Quote from: Illori on July 23, 2023, 11:29:11 AMhttps://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

Anyway I tried again with a fresh set of files, deleted Themes and Sources. The result is interesting: the first two mods  run still OK, but from the third no more...but that was the result in the previous version as well (there also the Tinyportal was the first, but now another mod, Simple Audio Video Embedder is running properly). Magic....


The error:
array(14) { [0]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [2]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(138) ["function"]=> string(12) "smf_db_query" } [3]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(301) ["function"]=> string(9) "log_error" } [4]=> array(1) { ["function"]=> string(17) "smf_error_handler" } [5]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(1027) ["function"]=> string(22) "mysqli_stmt_bind_param" } [6]=> array(3) { ["file"]=> string(45) "/home/strea334/public_html/Sources/Errors.php" ["line"]=> int(129) ["function"]=> string(19) "smf_db_error_insert" } [7]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(590) ["function"]=> string(9) "log_error" } [8]=> array(3) { ["file"]=> string(52) "/home/strea334/public_html/Sources/Subs-Db-mysql.php" ["line"]=> int(494) ["function"]=> string(12) "smf_db_error" } [9]=> array(3) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(928) ["function"]=> string(12) "smf_db_query" } [10]=> array(3) { ["file"]=> string(43) "/home/strea334/public_html/Sources/Subs.php" ["line"]=> int(6030) ["function"]=> string(14) "PackageInstall" } [11]=> array(3) { ["file"]=> string(47) "/home/strea334/public_html/Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" } [12]=> array(3) { ["file"]=> string(44) "/home/strea334/public_html/Sources/Admin.php" ["line"]=> int(499) ["function"]=> string(8) "Packages" } [13]=> array(3) { ["file"]=> string(36) "/home/strea334/public_html/index.php" ["line"]=> int(184) ["function"]=> string(9) "AdminMain" } } Error loop.

hustreamload

#48
Quote from: hustreamload on July 24, 2023, 01:30:28 AM... but now another mod, Simple Audio Video Embedder is running properly). Magic....

One more plus info: Simple Audio Video Embedder seemed running properly, but it doesn't really work. And it cannot be unistalled:


Is it interesting that above Simplemachines Download Site is "Unknown or Not Found"?

Diego Andrés

Did you not uninstall it before replacing the files?
You can use fix_packages.php tool, but it doesn't work on PHP 8+

SMF Tricks - Free & Premium Responsive Themes for SMF.

Sir Osis of Liver

Quote from: hustreamload on July 24, 2023, 12:33:51 AM
Quote from: Sir Osis of Liver on July 23, 2023, 02:35:01 PMHooks?  Maybe upload clean files and remove hooks before reinstalling mods.
Sorry, what does it mean practically? Pls step by step (see my last 2 post before).

Uploading clean files does not fix it, and the result seems to be erratic.  As mentioned early on in this topic, the problem may be in the database.  2.1 upgrade is supposed to remove integration hooks, which are added to the db by hooked mods.  It's possible one or more hooks weren't removed successfully, and that could cause grief for package manager.  When you upload clean files it removes all mods from the files, but does not affect the database.  There can be stray hooks, mod settings, mod tables.  The latter two are ignored, but it might be possible that a damaged hook is affecting mod installs (shawn?).  Hooks are in the settings table, they can be removed using repair_settings, or you can delete them manually. 

When in Emor, do as the Snamors.
                              - D. Lister

Diego Andrés

You can also disable or remove hooks from Forum Maintenance > Integration Hooks section.

SMF Tricks - Free & Premium Responsive Themes for SMF.

hustreamload

Quote from: Sir Osis of Liver on July 24, 2023, 01:42:06 PMUploading clean files does not fix it, and the result seems to be erratic.  As mentioned early on in this topic, the problem may be in the database.  2.1 upgrade is supposed to remove integration hooks, which are added to the db by hooked mods.  It's possible one or more hooks weren't removed successfully, and that could cause grief for package manager.  When you upload clean files it removes all mods from the files, but does not affect the database.  There can be stray hooks, mod settings, mod tables.  The latter two are ignored, but it might be possible that a damaged hook is affecting mod installs (shawn?).  Hooks are in the settings table, they can be removed using repair_settings, or you can delete them manually. 

Ok, I ve deleted all hooks, then made a clean upgrade by https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files...Now only one mod ia working, that is the Tinyportal, nothing else. PLUS I've uploaded native language, I push the change button, green light, succesful...and remains English. Terrible....


Sir Osis of Liver

Your forum is not displaying english to guests.  Do you have english selected as your language in profile?
When in Emor, do as the Snamors.
                              - D. Lister

hustreamload

#54
Quote from: Sir Osis of Liver on July 24, 2023, 10:17:24 PMYour forum is not displaying english to guests.  Do you have english selected as your language in profile?


Of course, see pic above, and this:


As guest the login box is hungarian, after login changes to english.

***this one is solved, it was my fault: after disabling the user selectable language support the main language have changed correctly****

Ok, then remains "only" the main error

shawnb61

Quote from: hustreamload on July 24, 2023, 06:26:26 PMOk, I ve deleted all hooks, then made a clean upgrade by https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files...Now only one mod ia working, that is the Tinyportal, nothing else. PLUS I've uploaded native language, I push the change button, green light, succesful...and remains English. Terrible....

With a fresh set of files, you are trying to make your forum look like a new install, no mods. 

You will need to deinstall all the mods first.  You shouldn't see any mods listed as installed under Admin | Package Manager when this is complete.  Double-check & confirm the hooks are gone under Admin | Maintenance.  

If you followed the optional step of deleting the /Sources and /Themes folders, you are going to also need to re-upload all the language packs & themes & revisit those settings to make sure they make sense. If you did not delete those folders, this should not be necessary.

One thing I would do, if I were in your shoes, after refreshing the full set of files, is to empty the smf_log_packages table.  Especially since the problems you are having appear to be around queries related to this table.

After refreshing your code, you are aiming for (1) all new files, (2) no installed packages, (3) no hooks at all.

After ensuring the 3 conditions above are met, the next thing I would do is some routine maintenance:
- Run the Optimize all tables function under Forum Maintenance.  If there is a DB issue with one or more tables, this will error out.  This would be good to know...
- Run the Find & Repair Any Errors under Forum Maintenance.  Shouldn't hurt...

Another thing I would do if I were in your place is confirm the DB matches desired DB.  I have a utility that will help with this:
https://raw.githubusercontent.com/sbulen/sjrbTools/master/smf_db_compare.php

Right-click & download that utility.  Copy it to your forum root, then run it from your browser.

If there is anything missing from your DB, it will be highlighted in RED.  Let us know about those.

If there are columns/tables added (via mods or manually), they will be highlighted in GREEN.  You want to make sure these make sense & you know why they were added.

Ignore anything highlighted in yellow for now.

But raise any items in red here for us to look at.

When we are done reviewing this, it will be time to reinstall mods, one at a time.

Hope this helps,
A question worth asking is born in experience & driven by necessity. - Fripp

hustreamload

Thanks shawnb61, I try it. As earlier wrote here, Find & Repair Any Errors under Forum Maintenance doesn't work, it runs on 503 error Service unavailable. I come back soon.

hustreamload

Quote from: shawnb61 on July 25, 2023, 12:34:24 AMAnother thing I would do if I were in your place is confirm the DB matches desired DB.  I have a utility that will help with this:
https://raw.githubusercontent.com/sbulen/sjrbTools/master/smf_db_compare.php
....

If there is anything missing from your DB, it will be highlighted in RED.  Let us know about those.

If there are columns/tables added (via mods or manually), they will be highlighted in GREEN.  You want to make sure these make sense & you know why they were added.

Ignore anything highlighted in yellow for now.

But raise any items in red here for us to look at.

These are the red rows, on the left side they are empty, on the right side the following:

smf_boards   1   idx_member_groups   1   member_groups   48

smf_topics   0   idx_first_message   1   id_first_msg   null
smf_topics   0   idx_first_message   2   id_board   null
smf_topics   0   idx_last_message   1   id_last_msg   null
smf_topics   0   idx_last_message   2   id_board   null

shawnb61

Can you show the structure for the smf_boards & smf_topics records?   

Include the indexes.  Screen shot from phpmyadmin Structure tab is OK.

If we confirm those indexes are missing, that might explain the 503.  That can be easily fixed.
A question worth asking is born in experience & driven by necessity. - Fripp


Advertisement: