Advertisement:

Author Topic: Issue upgrading from 2.0.15 -> 2.0.16  (Read 318 times)

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Issue upgrading from 2.0.15 -> 2.0.16
« on: February 14, 2020, 02:10:32 AM »
I'm running into an issue upgrading to 2.0.16.

I found the solution for the double-comment in (I already forgot the filename), but my final error is on Subs.php.  The test errors:

Code: [Select]
11. Replace ./Sources/Subs.php Test failed
12. Replace ./Sources/Subs.php Test failed

The diff on my Subs.php and Subs.php~ file is:

Code: [Select]
11c11
<  * @version 2.0.14
---
>  * @version 2.0.13
1271,1281c1271,1275
< 'validate' => function (&$tag, &$data, $disabled)
< {
< global $image_proxy_enabled, $image_proxy_secret, $boardurl;
<
< $data = strtr($data, array('<br>' => ''));
< if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
< $data = 'http://' . $data;
<
< if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
< $data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
< },
---
> 'validate' => create_function('&$tag, &$data, $disabled', '
> $data = strtr($data, array(\'<br />\' => \'\'));
> if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
> $data = \'http://\' . $data;
> '),
1288,1298c1282,1286
< 'validate' => function (&$tag, &$data, $disabled)
< {
< global $image_proxy_enabled, $image_proxy_secret, $boardurl;
<
< $data = strtr($data, array('<br>' => ''));
< if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0)
< $data = 'http://' . $data;
<
< if (substr($data, 0, 8) != 'https://' && $image_proxy_enabled)
< $data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
< },
---
> 'validate' => create_function('&$tag, &$data, $disabled', '
> $data = strtr($data, array(\'<br />\' => \'\'));
> if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
> $data = \'http://\' . $data;
> '),
1860c1848
< if (!isset($disabled['email']) && filter_var($data, FILTER_VALIDATE_EMAIL) !== false && strpos($data, '[email') === false)
---
> if (!isset($disabled['email']) && strpos($data, '@') !== false && strpos($data, '[email') === false)
3234c3222
< global $user_settings, $smcFunc, $boardurl, $image_proxy_enabled, $image_proxy_secret;
---
> global $user_settings, $smcFunc;
3287c3275
< elseif (substr($user_info['avatar']['url'], 0, 7) == 'http://' || substr($user_info['avatar']['url'], 0, 8) == 'https://')
---
> elseif (substr($user_info['avatar']['url'], 0, 7) == 'http://')
3289,3292c3277
< if (substr($user_info['avatar']['url'], 0, 8) != 'https://' && $image_proxy_enabled)
< $context['user']['avatar']['href'] = $boardurl . '/proxy.php?request=' . urlencode($user_info['avatar']['url']) . '&hash=' . md5($user_info['avatar']['url'] . $image_proxy_secret);
< else
< $context['user']['avatar']['href'] = $user_info['avatar']['url'];
---
> $context['user']['avatar']['href'] = $user_info['avatar']['url'];
3413a3399,3404
>
> // Are we debugging the template/html content?
> if (!isset($_REQUEST['xml']) && isset($_GET['debug']) && !$context['browser']['is_ie'] && !WIRELESS)
> header('Content-Type: application/xhtml+xml');
> elseif (!isset($_REQUEST['xml']) && !WIRELESS)
> header('Content-Type: text/html; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));


How can I fix this?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #1 on: February 14, 2020, 10:42:25 AM »
Or, if nobody knows, is there harm in me overwriting that file with the *.php~ version?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,824
    • sbulen on GitHub
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #2 on: February 14, 2020, 10:56:54 AM »
That looks like you maybe entered some manual fixes for the proxy in there?  Any manual updates would have to be reversed before applying the patch. 

That doesn't look like it has been altered by a mod.  So I would just copy the corresponding code from a vanilla 2.0.15 file.  That would reverse any manual edits made.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #3 on: February 14, 2020, 10:58:07 AM »
That looks like you maybe entered some manual fixes for the proxy in there?  Any manual updates would have to be reversed before applying the patch. 

That doesn't look like it has been altered by a mod.  So I would just copy the corresponding code from a vanilla 2.0.15 file.  That would reverse any manual edits made.

So overwrite the file from the tilde version?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,824
    • sbulen on GitHub
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #4 on: February 14, 2020, 11:40:11 AM »
No.  I have no idea what is in your tilde version...

Get a 2.0.15 file & replace the updated portions of code with the 2.0.15 code.   The idea is to remove any manual edits thst were made.

If you have zero mods installed, it would be ok to just copy over the 2.0.15 file.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,824
    • sbulen on GitHub
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #5 on: February 14, 2020, 11:48:04 AM »
Are you doing a 2.0.15 => 2.0.16 patch or a 2.0.13 => 2.0.14 patch?   Your code snippet mentions the latter...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #6 on: February 14, 2020, 12:09:13 PM »
No.  I have no idea what is in your tilde version...
OK. I was under the impression that the tilde version was the original file. I guess that's not correct.

Quote
Get a 2.0.15 file & replace the updated portions of code with the 2.0.15 code.   The idea is to remove any manual edits thst were made.

If you have zero mods installed, it would be ok to just copy over the 2.0.15 file.

OK, I'll go that direction.. thank you!
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #7 on: February 14, 2020, 12:10:20 PM »
Are you doing a 2.0.15 => 2.0.16 patch or a 2.0.13 => 2.0.14 patch?   Your code snippet mentions the latter...

2.0.15 -> 2.0.16

My code snippet was a diff between the current file and it's tilde counterpart.
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,826
  • Gender: Male
    • Kindred-999 on GitHub
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #8 on: February 14, 2020, 12:40:17 PM »
yes. the tilde file is the last saved version before the last edit....

So, you either need a baseline version of the file (which may screw up a bunch of your mods, depending on what is there)
or you can manually make the required changes using human decision making -- the failure is because the code the system is looking for is not an exact match
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #9 on: February 14, 2020, 03:07:13 PM »
yes. the tilde file is the last saved version before the last edit....

So, you either need a baseline version of the file (which may screw up a bunch of your mods, depending on what is there)
or you can manually make the required changes using human decision making -- the failure is because the code the system is looking for is not an exact match

Understood.  Thank you.
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Offline cpf

  • Semi-Newbie
  • *
  • Posts: 74
    • Conservative Political Forum
Re: Issue upgrading from 2.0.15 -> 2.0.16
« Reply #10 on: February 17, 2020, 08:47:20 PM »
Replacing the file with the version in the 2.015 upgrade archive worked, as did the subsequent upgrade to 2.0.17.

Thanks!
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.