Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: mlemke on January 06, 2020, 12:28:23 PM

Title: Can not update from 2.0.15
Post by: mlemke on January 06, 2020, 12:28:23 PM
After upload smf_patch_2.0.16.tar.gz there was an error message, so I probed to patch with smf_patch_2.0.17.tar.gz, but this failed too.

All other attempts were terminated without an error message with the reference: "The file you want to upload already exists on the server. Please delete it first and try again."

But where I can find (and delete) them on the server?

Martin
Title: Re: Can not update from 2.0.15
Post by: m4z on January 06, 2020, 12:37:19 PM
How did you upload the file?

What were the errors for the 2.0.16 and .17 files, and when did they pop up? When uploading? When attempting to install the patch?
Title: Re: Can not update from 2.0.15
Post by: Shambles on January 06, 2020, 12:48:01 PM
Quote from: mlemke on January 06, 2020, 12:28:23 PM
But where I can find (and delete) them on the server?

Within the Packages directory.
Title: Re: Can not update from 2.0.15
Post by: mlemke on January 06, 2020, 02:31:09 PM
Quote from: Shambles on January 06, 2020, 12:48:01 PMWithin the Packages directory.

Thank You! This was helpful.

Quote from: m4z on January 06, 2020, 12:37:19 PMHow did you upload the file?

Package upload.

QuoteWhat were the errors for the 2.0.16 and .17 files, and when did they pop up? When uploading? When attempting to install the patch?

Once again.

Error while installation. I do not understand, what is to do (see attachment).

Best wishes

Martin
Title: Re: Can not update from 2.0.15
Post by: Shambles on January 06, 2020, 02:42:01 PM
Click the icon to see what the package manager is trying to find.



Then, have a quick read of this to see what to do next:

https://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Can not update from 2.0.15
Post by: m4z on January 06, 2020, 02:54:40 PM
Quote from: mlemke on January 06, 2020, 02:31:09 PM
QuoteWhat were the errors for the 2.0.16 and .17 files, and when did they pop up? When uploading? When attempting to install the patch?

Once again.

Error while installation. [...]


Your first post didn't specify this:

Quote from: mlemke on January 06, 2020, 12:28:23 PM
After upload smf_patch_2.0.16.tar.gz there was an error message, so I probed to patch with smf_patch_2.0.17.tar.gz, but this failed too.
Title: Re: Can not update from 2.0.15
Post by: mlemke on January 06, 2020, 03:16:03 PM
See attachment, but I can not find $buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~'" in the file QueryString.php

What goes wrong?

Martin
Title: Re: Can not update from 2.0.15
Post by: Shambles on January 06, 2020, 03:38:43 PM
That line should be in your file, as no mod on this planet would amend it.

I suggest you download your current QueryString.php file and attach it to your next post, so we can have a look at it and advise further.
Title: Re: Can not update from 2.0.15
Post by: mlemke on January 06, 2020, 03:53:40 PM
My current file...

to search:
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', 'pathinfo_insert__preg_callback', $buffer);
}


replace:
// Be nice and try to inject session tokens into login forms since many older themes don't.
if ($user_info['is_guest'])
$buffer = preg_replace_callback(
'~(<form[^<]+action=login2(.+))</form>~iUs' . (!empty($context['utf8']) ? 'u' : ''),
function ($m) use ($context)
{
$repl = '';
if (strpos($m[0], $context['session_var']) === false)
$repl .= '<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"/>';

return $m[1] . $repl . '</form>';
},
$buffer
);


files:
1) QueryString.php (* @version 2.0.9)
2) installed packets
Title: Re: Can not update from 2.0.15
Post by: Shambles on January 06, 2020, 04:06:33 PM
Ok. Despite what I said earlier, something has added a page query.

Make a backup of your "live" QueryString.php file then upload this one. Then try the 2.0.16 upgrade and report back.

Title: Re: Can not update from 2.0.15
Post by: mlemke on January 07, 2020, 04:04:01 PM
Thank You, that has matched!

Do You have any idea, what has caused the different?

Best wishes

Martin

Title: Re: Can not update from 2.0.15
Post by: Shambles on January 07, 2020, 04:15:42 PM
Sorry, no idea.
Title: Re: Can not update from 2.0.15
Post by: Chen Zhen on January 09, 2020, 12:04:21 AM

The file QueryString.php was previously changed by the Simple Portal installation.