Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: burd on February 20, 2021, 11:23:25 AM

Title: Can’t Upgrade
Post by: burd on February 20, 2021, 11:23:25 AM
 :-[
Title: Re: Can’t Upgrade
Post by: Aleksi "Lex" Kilpinen on February 20, 2021, 11:27:10 AM
It's most likely that some mod has edited that file, and simply uninstalling that mod temporarily would allow you to continue.
Other than that, for patches this applies https://wiki.simplemachines.org/smf/Error_in_mod_installation

There's always the option of doing a large upgrade as well, but for a single error that shouldn't be necessary really, and would mean uninstalling all mods you may have at once.
Title: Re: Can’t Upgrade
Post by: burd on February 21, 2021, 04:18:47 PM
What mod is causing it ?
Title: Re: Can’t Upgrade
Post by: Oldiesmann on February 21, 2021, 05:38:38 PM
We have no way of knowing that. Your best option is to install the upgrade then manually apply the step that's failing using a text editor. See the link that Lex posted above.
Title: Re: Can’t Upgrade
Post by: shadav on February 21, 2021, 07:04:46 PM
What mod is causing it ?

if you post what it's trying to find and what you actually have....we might be able to tell you which mod it is....if someone recognizes the code
Title: Re: Can’t Upgrade
Post by: burd on February 22, 2021, 06:21:48 PM
Where would that code be. 
Title: Re: Can’t Upgrade
Post by: Mick. on February 22, 2021, 06:56:13 PM
In Sources folder, find Subs.php file. copy everything and post it here (hopefully the character text is short enuff to post) using the bbc code when posting and we can tell you what's being modified. Or, upload a copy of the file in your post.
Title: Re: Can’t Upgrade
Post by: Mick. on February 22, 2021, 07:01:23 PM
I took a second look to the pic you posted; I think, I don't remember or i'm plain trippin' ( I only use 6 mods) but I thought that if you click on that line where it shows the error, it would show a window showing what's being modified. Or maybe the pencil icon on the far left?
Title: Re: Can’t Upgrade
Post by: shadav on February 22, 2021, 07:30:24 PM
I took a second look to the pic you posted; I think, I don't remember or i'm plain trippin' ( I only use 6 mods) but I thought that if you click on that line where it shows the error, it would show a window showing what's being modified. Or maybe the pencil icon on the far left?

yes if you click on the pencil icon it will pop up a screen and show what it is looking for and what it is trying to replace/add

will still need to see your subs.php file though to know what is different between your file and a default file and hopefully figure out which mod it was
Title: Re: Can’t Upgrade
Post by: Mick. on February 22, 2021, 07:33:11 PM
I took a second look to the pic you posted; I think, I don't remember or i'm plain trippin' ( I only use 6 mods) but I thought that if you click on that line where it shows the error, it would show a window showing what's being modified. Or maybe the pencil icon on the far left?
yes if you click on the pencil icon it will pop up a screen and show what it is looking for and what it is trying to replace/add
I thought I had seen it before; but wasn't sure hehehehe, thank you.
Title: Re: Can’t Upgrade
Post by: burd on February 24, 2021, 02:28:39 PM
I clicked on the first and last error.   See below.
Title: Re: Can’t Upgrade
Post by: shadav on February 24, 2021, 02:34:29 PM
ah yes, that's from the open mod reports
https://custom.simplemachines.org/mods/index.php?mod=3666

in the upgrade install
find
Code: [Select]
<operation>
<search position="replace"><![CDATA[ $context['menu_buttons'][$current_action]['active_button'] = true;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))]]></search>
<add><![CDATA[ if (isset($context['menu_buttons'][$current_action]))
$context['menu_buttons'][$current_action]['active_button'] = true;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))]]></add>
</operation>

replace with
Code: [Select]
<operation>
<search position="replace"><![CDATA[ $context['menu_buttons'][$current_action]['active_button'] = true;
if (!empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1' && $context['open_mod_reports'] > 0)
$context['menu_buttons']['moderate']['title'] .= ' [<strong>' .$context['open_mod_reports'] . '</strong>]';


if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))]]></search>
<add><![CDATA[ if (isset($context['menu_buttons'][$current_action]))
$context['menu_buttons'][$current_action]['active_button'] = true;
if (!empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1' && $context['open_mod_reports'] > 0)
$context['menu_buttons']['moderate']['title'] .= ' [<strong>' .$context['open_mod_reports'] . '</strong>]';


if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))]]></add>
</operation>

or you could uninstall the mod, run the upgrade and then reinstall the mod

I had the same issue, and that's what I did above and it seems to work for me :)
Title: Re: Can’t Upgrade
Post by: burd on February 24, 2021, 02:43:10 PM
I can uninstall the mod, what mod is causing this?
Title: Re: Can’t Upgrade
Post by: burd on February 24, 2021, 02:45:20 PM
Here’s my list
Title: Re: Can’t Upgrade
Post by: shadav on February 24, 2021, 02:45:41 PM
ah yes, that's from the open mod reports
https://custom.simplemachines.org/mods/index.php?mod=3666
;D
Title: Re: Can’t Upgrade
Post by: burd on February 24, 2021, 02:52:36 PM
I dont see I have that mod?
Title: Re: Can’t Upgrade
Post by: shadav on February 24, 2021, 02:56:12 PM
as it's only one line, maybe you did it by hand?
then again I could be wrong and it's a completely different mod that edits the same line....

can you upload your subs.php
Title: Re: Can’t Upgrade
Post by: Kindred on February 24, 2021, 03:01:32 PM
instead of messing around with changing the upgrade package, I recommend just changing the affected lines by hand, using human knowledge to determine what changes need to be made (machine matching means that the EXACT match must be found, while human logic should allow someone to find the correct area and make the needed modification on top of whatever was previously done.
Title: Re: Can’t Upgrade
Post by: burd on February 24, 2021, 03:04:06 PM
This?
Title: Re: Can’t Upgrade
Post by: shadav on February 24, 2021, 03:12:55 PM
in your hosting account go to your file editor
or use a ftp
go to your forum's folder
go to the Sources folder
find the file named: Subs.php

download that file and then attach it here

if I can see the code that you currently have, I might be able to tell you exactly which mod it is so you can uninstall the mod