News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error updating 2.0.14 to 2.0.15

Started by Gantry, June 05, 2021, 01:26:01 AM

Previous topic - Next topic

Gantry

Keep in mind it's been a couple of years since I did any work on my site, it's been mostly run my trusted members.

Currently running 2.0.14, and a member contacted me that there was a database error.
I logged in, backed up structure + data. It's using PHP 5.6.40.
Did a repair, fixed some issues, then after that database clean.
I can browse the forum, just can't post, when I try to post it says:

QuoteDatabase Error
Field 'edit_reason' doesn't have a default value
File: /home/redacted/domains/redacted.com/public_html/community/Sources/Subs-Post.php
Line: 1825

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.14, while your database is at version 2.0.4. The above error might possibly go away if you execute the latest version of upgrade.php.

So unsure of how to run upgrade.php, so I did an SMF upgrade:

QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
This is the only failed in the list:
Quote18.   Execute Modification   ./Sources/ManageMembers.php   Test failed
   1.   Replace   ./Sources/ManageMembers.php   Test successful
   2.   Replace   ./Sources/ManageMembers.php   Test failed
   3.   Replace   ./Sources/ManageMembers.php   Test successful

If I use upgrade.php will that solve this issue?


Aleksi "Lex" Kilpinen

Forget the upgrade.php and update for now - You definitely should update, but that isn't related to the error really.
The error is because you have a mod that is used to log "Edit reason", and it has added a field in your database without a default value.
You can add a default value for the field, ask the mod author to update their mod, or remove the mod and the associated field.

After fixing that, you can return to figuring out why the update is failing - for that, I'd take a look at what mods you have installed that would edit ManageMembers.php?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Gantry

Thank you for your help so far, there was a "reason for edit" mod installed, it wasn't critical so I deleted it and upgraded successfully to 2.0.15.

I went to upgrade to 2.0.16, but now I'm getting some errors that I cannot find a reason for, here are the errors (successful steps removed for readability):

Quote38.   Execute Modification   ./Sources/Profile-Modify.php   Test failed
...
   6.   Replace   ./Sources/Profile-Modify.php   Test failed
...
*   40.   Execute Modification   ./Sources/QueryString.php   Test failed
   1.   Replace   ./Sources/QueryString.php   Test successful
   2.   Add After   ./Sources/QueryString.php   Test failed

and

Quote56.   Execute Modification   ./Sources/Subs.php   Test failed
...
   11.   Replace   ./Sources/Subs.php   Test failed
   12.   Replace   ./Sources/Subs.php   Test failed

and here are my mods (smf updates removed for readability):

Quote1.   Downloads System   1.5.2    [ Uninstall ] [ List Files ] [ Delete ]
2.   Multiple Stars   V1    [ Uninstall ] [ List Files ] [ Delete ]
3.   Order Custom Profile Fields   1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
4.   SMFPacks: SEO Pro Mod   1.1.6    [ Uninstall ] [ List Files ] [ Delete ]
5.   Share This Topic   4.1.2   [ Install Mod ] [ List Files ] [ Delete ]
6.   Simple Audio Video Embedder   3.5.1    [ Uninstall ] [ List Files ] [ Delete ]
7.   SimplePortal   2.3.5    [ Uninstall ] [ List Files ] [ Delete ]
8.   Stop Spammer   2.3.9    [ Uninstall ] [ List Files ] [ Delete ]
9.   Google Analytics Code   1.4   [ Install Mod ] [ List Files ] [ Delete ]
21.   Tapatalk SMF 2.0 Plugin   4.3.6    [ Uninstall ] [ List Files ] [ Delete ]
22.   SMF 2.0.16 Update   1.0   [ Install Mod ] [ List Files ] [ Delete ]

None of those afaik should have any effect on modify profile, except for Order Custom Profile Fields, which only runs when you run it afaik?
Question 2, my database is rather old version 2.0.6 or something, it suggests I run upgrade.php but i can't find it in my site at all, and its not in the upgrade package, where do I find it?

Kindred

There are no database changes.  That "error" message is a red herring.

As for the failures... you'll need to manually edit that code
Сл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."

Gantry

Quote from: Kindred on June 06, 2021, 12:26:52 AM
There are no database changes.  That "error" message is a red herring.

As for the failures... you'll need to manually edit that code

Thanks for that, I would never have known. As for manually editing the code, I can see no reason why it would successfully make changes in the previous steps to a line directly above it, yet fail on the very next step in the very same PHP file? I'm very nervous about editing the code...

Steve

Quote from: Gantry on June 05, 2021, 04:07:04 PMthere was a "reason for edit" mod installed, it wasn't critical so I deleted it

I hope you mean you uninstalled it. :)

As for the errors read this (it's for mods but the procedure is exactly the same):

https://wiki.simplemachines.org/smf/Error_in_mod_installation
DO NOT pm me for support!

Advertisement: