TinyPortal

Development => Support => Installation => Topic started by: DJ Doena on January 25, 2014, 06:36:35 PM

Title: TP 1.0 on SMF 2.0.7
Post by: DJ Doena on January 25, 2014, 06:36:35 PM
Hi,

I just set up a new SMF 2.0.7

When I try to install TP 1.0 I get a test error in

/sources/querystring.php Test Failed

Why? Because it's looking for this:

// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);


to be replaced with this

// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);


The difference here seems to be the

|page|cat

in both lines

Problem is, in 2.0.7 the code in question looks like this

// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);


I manually replaced it with this

// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"~', create_function('$m', 'global $scripturl; return \'"\' . $scripturl . "/" . strtr("$m[1]", \'&;=\', \'//,\') . ".html?" . SID . (isset($m[2]) ? $m[2] : "") . \'"\';'), $buffer);
else
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"~', create_function('$m', 'global $scripturl; return \'"\' . $scripturl . "/" . strtr("$m[1]", \'&;=\', \'//,\') . ".html" . (isset($m[2]) ? $m[2] : "") . \'"\';'), $buffer);


This should be correct, shouldn't it?
Title: Re: TP 1.0 on SMF 2.0.7
Post by: IchBin on January 25, 2014, 07:53:26 PM
I was wondering if this patch was going to make problems with the TP install. I'll have to take a look at the changes SMF has made to see what is happening.

From a quick look at your code, you are missing the page|cat parts that TP adds.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: DJ Doena on January 25, 2014, 08:13:10 PM
Quote from: IchBin™ on January 25, 2014, 07:53:26 PM
From a quick look at your code, you are missing the page|cat parts that TP adds.

Err, yeah. I have them in the actual code. I just forgot them in the posting above. I've modified it now.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: lurkalot on January 25, 2014, 09:22:16 PM
@ DJ Doena

Just curious.  Was this a completely new install of SMF 2.0.7 ?  Or SMF upgraded using the 2.0.6 - 2.0.7 patch?
Title: Re: TP 1.0 on SMF 2.0.7
Post by: DJ Doena on January 25, 2014, 09:35:09 PM
Quote from: lurkalot on January 25, 2014, 09:22:16 PM
@ DJ Doena

Just curious.  Was this a completely new install of SMF 2.0.7 ?  Or SMF upgraded using the 2.0.6 - 2.0.7 patch?

OK, "completely new" may have been an exaggeration. I upgraded from 1.1.19 to 2.0.7, removed all old themes and add-ons and then added TP 1.0 as the first add-on.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: IchBin on January 25, 2014, 09:50:00 PM
You can replace the section in the install.xml file with this to finish the install if you'd like. With the changes they added in 2.0.7 it makes it so TP can't install in a new install. Looks like we need to push out a new version faster than planned.

<file name="$sourcedir/QueryString.php">
<operation>
<search position="replace"><![CDATA['\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#"]+?)(#[^"]*?)?"~']]></search>
<add><![CDATA['\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"~']]></add>
</operation>
<operation>
<search position="replace"><![CDATA['\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~']]></search>
<add><![CDATA['\?((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"~']]></add>
</operation>
</file>
Title: Re: TP 1.0 on SMF 2.0.7
Post by: lurkalot on January 25, 2014, 09:54:04 PM
Thanks for the reply.  I was just testing this on a new install a couple minutes ago.

Brad.  Annoyingly, they fixed the 2.0.7 patch so it will install when Tinyportal is already installed. (Which it does nicely) 

But after applying the 2.0.7 patch you can't uninstall Tinyportal without getting a test failed. The patch has to then be uninstalled before you can uninstall Tinyportal
Title: Re: TP 1.0 on SMF 2.0.7
Post by: IchBin on January 25, 2014, 09:58:09 PM
Ouch, I didn't even think about that. And the next TP version is going to require people to uninstall too. Since I added all the new hooks into the TP install, it now doesn't require a lot of the file edits. Which means people have to uninstall TP 1.0 to remove the code before they can install TP 1.1.....

Well, I guess this means we'll just have to try to tell people in advance and hopefully they won't have a big problem with it.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: lurkalot on January 25, 2014, 10:03:47 PM
I know they tried to make the patch play nicely with Tinyportal, and SP, I'm guessing they will have the same problem uninstalling SP.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: ZarPrime on January 25, 2014, 10:18:30 PM
Yeah, ouch.  I hope we don't run into something similar when they release 2.1 to beta. :tickedoff:

ZarPrime
Title: Re: TP 1.0 on SMF 2.0.7
Post by: lurkalot on January 25, 2014, 10:32:40 PM
Quote from: ZarPrime on January 25, 2014, 10:18:30 PM
Yeah, ouch.  I hope we don't run into something similar when they release 2.1 to beta. :tickedoff:

ZarPrime

Hi Jim.  Yeah hope not.  Talking of 2.1, do we have anything up our sleeves for TP compatibility?

@ DJ Doena

I apologise for hijacking your topic.  :-[
Title: Re: TP 1.0 on SMF 2.0.7
Post by: ZarPrime on January 25, 2014, 11:07:12 PM
Quote from: IchBin™ on January 25, 2014, 09:58:09 PM
Ouch, I didn't even think about that. And the next TP version is going to require people to uninstall too. Since I added all the new hooks into the TP install, it now doesn't require a lot of the file edits. Which means people have to uninstall TP 1.0 to remove the code before they can install TP 1.1.....

Well, I guess this means we'll just have to try to tell people in advance and hopefully they won't have a big problem with it.

Well, I suppose that we should add the instructions to do an uninstall of TP before trying to install 1.1, similar to what had to be done when going from 0.98 to 1.X.  In other words, it's a pain, but we did it that way before.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: ZarPrime on January 25, 2014, 11:09:36 PM
Quote from: lurkalot on January 25, 2014, 10:32:40 PM
Hi Jim.  Yeah hope not.  Talking of 2.1, do we have anything up our sleeves for TP compatibility?

I don't know Mick.  This has been kind of a rough month for me, and it's not getting better very quickly.  This cold weather we've been having hasn't helped my recovery much yet either.

Jim
Title: Re: TP 1.0 on SMF 2.0.7
Post by: Maxx1 on January 26, 2014, 01:27:20 AM
OK,

What i did was to un install all mods before upgrade SMF 2.0.6 to 2.0.7, ( after they did the fixes to the SMF release), I then download and installed the TP and Got 1 QueryString.php error or something like that, it tried to replace and it fail the replace and so installed it anyway and it seems to be working fine. Did not try to un install the TP yet but will.

And For  the current version of TP will give you a corrupt file and wrong version warning if you down load it to the 2.1 Alpha, so it should be install anyway.

Now in short although it works for me with the one error , do not try it, unless you know your stuff on how recover your SMF and DB!!!!!

If I get more info tomorrow, I will post it here, so no rush and do not panic, Brad says He's looking into it, and please the note prior post to this!

Thanks and regards.
Maxx
Title: Re: TP 1.0 on SMF 2.0.7
Post by: Maxx1 on January 26, 2014, 02:21:54 AM
OK on un install of the TP current ver from the SMF current version get the same error:

QuoteExecute Modification    ./Sources/QueryString.php    Test failed
      1.    Replace    ./Sources/QueryString.php    Test failed
hope this helps!

be looking ore in the morning!

regards,
Maxx
Title: Re: TP 1.0 on SMF 2.0.7
Post by: lurkalot on January 26, 2014, 02:03:27 PM
Quote from: Maxx1 on January 26, 2014, 02:21:54 AM
OK on un install of the TP current ver from the SMF current version get the same error:

QuoteExecute Modification    ./Sources/QueryString.php    Test failed
      1.    Replace    ./Sources/QueryString.php    Test failed
hope this helps!

be looking ore in the morning!

regards,
Maxx

Maxx, this is fixed in the new TP version 1.1 Beta.  Installs and uninstalls fine on SMF 2.0.7

I have it installed here, http://cctestsite.info here, http://cctestsite.info/testsite2/ and here, http://guitaristguild.com/
Title: Re: TP 1.0 on SMF 2.0.7
Post by: Maxx1 on January 26, 2014, 02:09:23 PM
Mike thanks and that's cool news!

regards,
Maxx
Title: Re: TP 1.0 on SMF 2.0.7
Post by: dkstopo on February 05, 2014, 06:42:04 AM
hello everyone
I have the same problem
I'm looking for the new TP version 1.1Beta but i not could find
can you help me?
Title: Re: TP 1.0 on SMF 2.0.7
Post by: ZarPrime on February 06, 2014, 05:20:23 PM
Hello dkstopo,

Welcome to the TinyPortal Support Site.

What problem are you referring to?  Could you elaborate?

The "new TP version 1.1 Beta" has not yet been released publicly.  This is probably why you can't find it.  In fact, we should probably not even be talking about it here. ;)

ZarPrime
Title: Re: TP 1.0 on SMF 2.0.7
Post by: MasterSeal on September 30, 2014, 09:03:27 PM
Forgive the bump, but this has been since February, and the QueryString.php error in TP 1.0 still exists. Rather than start the thread all over again it made sense to bump this one.
I've tried a few times to replace the code, and although the replacement is successful, it completely messes with the SMF installation and does not function properly.  Could you shed some insight on this problem, or if you're ever going to release TP1.1 publicly? If I've missed something here, my apologies, I'm just NOT interested in using anything else other than TP as I've used your amazing portal for years in many SMF installs. Not interested in using anything else. Thank you for your incredible work and devotion to this project!

Kind Regards,
{OCS}MasterSeal
OutCastSnipers.com Owner.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: IchBin on October 02, 2014, 01:23:41 AM
All the code is public if you are one that doesn't mind living on the bleeding edge of software. :)
https://github.com/Blocthemes/TinyPortal

You are free to try it if you'd like. I'd advise running it in a test install to make sure it's working right for you.

If I remember right, if you want to install the new version, it will require you to uninstall the older version of TP before you can install the new one.  Not sure I was through with those changes though....

If you really need the changes, and can't get them done yourself, you can post your file here to see if someone can help you get them in.
Title: Re: TP 1.0 on SMF 2.0.7
Post by: MasterSeal on October 02, 2014, 02:40:49 AM
Thank you very much!

Cheers

...Seal...