TinyPortal

Development => Support => Topic started by: DistantJ on October 19, 2010, 07:28:18 PM

Title: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: DistantJ on October 19, 2010, 07:28:18 PM
Ok, I had a whole bunch of great PHP blocks on my site, and they were integral to it, but since updating (uninstalling old version, installing new version) to the latest version, every PHP block just gives me this:

Parse error: syntax error, unexpected T_VARIABLE in /home/distantj/hooplanet.co.uk/Sources/Load.php(2136) : eval()'d code(112) : eval()'d code on line 112

And the Recent Articles block also gives me a blank block which stops the rest of the page underneath it from loading.


Link to my site: http://www.hooplanet.co.uk
SMF version: 3.0 RC3
TP version: 1.0 RC1
Theme name and version: Custom, based on Mobile_alt 2.03
Browser Name and Version: Safari 5.0.2 (tested on on all Mac compatible browsers)
Mods installed:
Karma Buttons 1.1
Tapatalk SMF 2.0 RC3 Plugin 1.2.0
Activity in Profile 1.1 5.
nCode Image Resizer 1.3.1
Ultimate Profile 0.9.1
InLine Attachments 1.06 Beta
ENotify 2.0
PM Attachments 1.5
TinyPortal 1.101
Inline Hover Spoiler 1.5
Aeva Media 1.2
Related Error messages:
Parse error: syntax error, unexpected T_VARIABLE in /home/distantj/hooplanet.co.uk/Sources/Load.php(2136) : eval()'d code(112) : eval()'d code on line 112
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: DistantJ on October 19, 2010, 07:39:35 PM
FIXED: Just noticed that in uninstalling and reinstalling, it seems to have replaced every { in my PHP codes with « and every } with » which, oddly, in HTML, aren't even the codes for { and }, heh...

Anyway, replacing them makes PHP blocks work again, however the Recent Articles still breaks the whole page.
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 19, 2010, 07:47:44 PM
Quote from: DistantJ on October 19, 2010, 07:28:18 PM
Ok, I had a whole bunch of great PHP blocks on my site, and they were integral to it, but since updating (uninstalling old version, installing new version) to the latest version, every PHP block just gives me this:

Parse error: syntax error, unexpected T_VARIABLE in /home/distantj/hooplanet.co.uk/Sources/Load.php(2136) : eval()'d code(112) : eval()'d code on line 112

And the Recent Articles block also gives me a blank block which stops the rest of the page underneath it from loading.

DistantJ,

This is most likely because the code in your php blocks was written to work with SMF 1.1.XX and an earlier version of TinyPortal.  Nearly every php block that worked fine with the previous versions has to be updated for the new versions.  Can you attach the code from one of your php blocks to your next post so that we can test it on one of our test sites?  Please use code tags (#) when posting your code.

As for the blank Recent Articles block and the rest of the page not showing, it is likely the same problem as above.  The errant code in a previous block is keeping everything from the Recent Articles block down from rendering properly.  You can fix this temporarily until the php code blocks are fixed by turning off the php blocks until you or us have updated the block code snippets in your php blocks.

ZarPrime

Edit:  I don't see a "Recent Articles" block on your site.  Is it set to not show to Guests?
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: DistantJ on October 19, 2010, 08:02:24 PM
Thanks for your reply, as you can see above I noticed that in upgrading some symbols were changed to codes, which I've fixed and now those PHP blocks work, however the Recent Articles block I'm using is the built in one, I just got to Article/Download features, and select Recently Written articles, and it breaks.
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 19, 2010, 08:46:42 PM
OK, well then, I must say that I am somewhat confused.  As far as I know, there is no such thing as a built in "Recent Articles" block.  You aren't talking about the built in "Recent Topics" block are you?

ZarPrime
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: DistantJ on October 19, 2010, 09:11:49 PM
This one:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg69.imageshack.us%2Fimg69%2F5161%2Fscreenshot20101019at211.png&hash=43091c84505b58a5c225db89c1bc75e41890f9c4)
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 19, 2010, 09:43:59 PM
Aha, OK, I get it. ::)

OK, I just tested this and that block type seems to be broken for the moment.  I will have to put this in the BugTracker and let Bloc take a look at it.  Thanks for reporting it.  I can't give you an ETA on when there might be a fix at this time.

ZarPrime
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: IchBin on October 19, 2010, 09:52:13 PM
That article type works just fine for me on my site. What is wrong with it?
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 19, 2010, 09:57:50 PM
@Ichbin

The "Article/Download functions" type block doesn't work here with RC1.  I just created a left test block here to test it, though it's only visible to Admins.  However, I turned it back off so if you want to look at it, you'll need to turn it back on.  It's set to show in all areas I believe.  It's in the left panel, 2nd block from the top.  It definitely breaks the layout.

ZP
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: IchBin on October 19, 2010, 10:08:21 PM
Hmm... weird. Wonder why mine works and this one doens't. Maybe my files didn't get properly updated last time I upgraded.
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 19, 2010, 10:20:35 PM
No clue.  Maybe the problem was in the last version and the files here didn't get updated properly.  I still have a beta 5.2 test site.  I'll check it there to see if that block type is working.

ZP
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: IchBin on October 19, 2010, 10:27:09 PM
I see the problem. It would appear Bloc may have changed the queries or something between the latest version. He's referencing a variable for a time stamp that doesn't seem to exist. You can add this line of code on about line #2682 to fix it in TPSubs.php.
$now = forum_time();
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: DistantJ on October 19, 2010, 10:32:58 PM
Yep, adding that line worked a charm! Good job IchBin, and thanks!
Title: Re: Update to latest version broke all PHP blocks and Recent Articles block!
Post by: ZarPrime on October 21, 2010, 05:55:42 PM
I will place this in the bugTracker and mark this topic solved.

ZarPrime