Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-12-17 03:15:34

fotofred
Member
Registered: 2014-09-08
Posts: 42

Pherhaps problems with php7

Hi,
today i uploaded a lot of big CRG's.
The first ones are looking beautifull.
But after fininishing 12 gallerys. i got the following error.
(I guess my provider had updated today php to verison 7)

Function name must be a string|#0 /home/www/web566/html/ttg-be/framework/lib/Parsedown.php(931): Parsedown->element(Array) #1 /home/www/web566/html/ttg-be/framework/lib/Parsedown.php(257): Parsedown->elements(Array) #2 /home/www/web566/html/ttg-be/framework/lib/Parsedown.php(48): Parsedown->lines(Array) #3 /home/www/web566/html/ttg-be/publisher/application/models/Album.php(962): Parsedown->text('##Wohnbereiche ...') #4 /home/www/web566/html/ttg-be/publisher/application/models/Album.php(89): Album->parsedown('##Wohnbereiche ...') #5 /home/www/web566/html/ttg-be/templates/gallery/CR-Raumatelier/template_index.php(404): Album->getPageCopy() #6 /home/www/web566/html/ttg-be/publisher/application/controllers/GalleryController.php(328): include_once('/home/www/web56...') #7 /home/www/web566/html/ttg-be/framework/controllers/Controller.php(41): GalleryController->gallery('59678', 'index', '') #8 /home/www/web566/html/ttg-be/framework/Framework.php(124): Controller->dispatch(Array) #9 /home/www/web566/html/galerie/raumatelier/2011-05-11-r/lib.php(48): Framework->route() #10 /home/www/web566/html/galerie/raumatelier/2011-05-11-r/index.php(4): route(Array) #11 {main}|URL: /galerie/raumatelier/2011-05-11-r/index.php


i updated the galleries via ttg-be publisher admin and uploaded again ttg-be update 2.03 (the lattest downloadable version for me) and crg. Has anyone an idea how to fix this?

Offline

#2 2015-12-17 05:24:17

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Pherhaps problems with php7

Ben will need a link to your site and perhaps admin access to ttg-be


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2015-12-17 05:57:29

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Pherhaps problems with php7

You mentioned PHP 7.  From what I can tell fotofred.de is running PHP 5.6.  Is this on another site?
We don't support PHP 7, which was only launched a week or so ago.

That error is occurring in third-party code used to handle Markdown.  The line at 931 says:

 $markup .= $this->element($Element);

To debug it I would try to find out what's stored in $Element by adding this line above the previous:

echo '$Element: <pre>'.print_r($Element, true).'</pre>';

Note that the above will print to the web page every time that function is called, so you'd only want to keep the line temporarily to see what it prints.

Offline

#4 2015-12-17 06:03:17

fotofred
Member
Registered: 2014-09-08
Posts: 42

Re: Pherhaps problems with php7

Hi Ben,

the problem is on fotomatisch.de, not fotofred.de
http://fotomatisch.de/ttg-be/admin/?a=phpinfo
perhaps owncloud will cause problems, i'am not shure.

Offline

#5 2015-12-17 08:41:39

fotofred
Member
Registered: 2014-09-08
Posts: 42

Re: Pherhaps problems with php7

I call my Provider to downgrade Php back to 5.6.
Thx for Support

Offline

#6 2015-12-17 08:58:05

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Pherhaps problems with php7

I can see that Parsedown has been updated significantly, including a complete re-working of the function that throws the error. Chances are that it will now work with PHP 7. I will setup a PHP 7 server over the weekend and see whether that's the case and what other issues may arise. Hopefully none, as we try to make the code as generic as possible to run on a variety of PHP versions.

Is your host helping to switch to 5.6? IMO, forcing version 7 on customers would be premature. It's likely that other PHP code such as WP plugins would break.

Offline

#7 2015-12-17 09:13:48

fotofred
Member
Registered: 2014-09-08
Posts: 42

Re: Pherhaps problems with php7

Two weeks ago i got PHP version 5.2.4 for a long time till i asked for an update.
PHP 7 is a big Change i was wondered that they had upgraded me so early now.
I mailed for a downgrade, but if you are interessted in making some tests on my domain let me know.

Offline

#8 2015-12-17 21:27:08

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Pherhaps problems with php7

I've been researching PHP 7 compatibility and I can't see anything that should be broken in our own code.
Testing with PHP 7, the only breakage has been the Parsedown.php file.  Downloading the latest version of the file solves the problem.

Are you happy to update the file and see whether everything else works correctly?  That is assuming you're still on PHP 7.  Let me know and I'll provide you with the latest version of the file to update.

Offline

#9 2015-12-18 20:59:02

fotofred
Member
Registered: 2014-09-08
Posts: 42

Re: Pherhaps problems with php7

hmm, a cs3 crg gallery runs fine under php7.

i added the markdown code to custom.ss

.highslide-controls, .hs-info-overlay, .highslide-image {
    box-shadow: none;
}
$markup .= $this->element($Element);
echo '$Element: <pre>'.print_r($Element, true).'</pre>';

and also into pagecopy(md)

##5 X 3 <br>
14.09. - 23.09.2012<br>
Heinz Baumüller, Thomas Brinkmann, Julia Bünnagel<br>
Kurator: Michael Voets
echo '$Element: <pre>'.print_r($markup .= $this->elementt, true).'</pre>';

http://fotomatisch.de/galerie/baumueller/5x3/

Offline

#10 2015-12-18 21:20:55

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Pherhaps problems with php7

CE3 uses markdown.php, and not Parsedown.php.  The code is different, so would explain why CE3 doesn't have the same problem.

Offline

#11 2015-12-18 21:43:50

fotofred
Member
Registered: 2014-09-08
Posts: 42

Re: Pherhaps problems with php7

With empty Pagecopy the gallery works fine and fast.

Offline

Board footer

Powered by FluxBB