0
Welcome Guest! Login
0 items Join Now

SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    • Dan Walker's Avatar
    • Dan Walker
    • Hero Rocketeer
    • Posts: 476
    • Thanks: 14
    • Designer/Developer

    SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 6 months ago
    • I have tried three G4 sites with Php 7.1 (different templates) and all fail with error:
      Error displaying the error page: [] operator not supported for strings: [] operator not supported for strings
      G5 sites work with Php 7.1.

      Is G4 incompatible with Php 7.1? Or would it be due to an extension? For some reason, nothing is shown in the php error logs.
    • Last Edit: 2 years 6 months ago by Dan Walker.
    • Dan Walker - Web Designer & Developer @ Top Webs Network
      Custom Joomla & Wordpress Websites
    • Dan Walker's Avatar
    • Dan Walker
    • Hero Rocketeer
    • Posts: 476
    • Thanks: 14
    • Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 6 months ago
    • Apparently the issue is the templates. Seems as though the Gantry default template v4.1.32 is not compatible with php 7.1. Please fix ASAP.
    • Dan Walker - Web Designer & Developer @ Top Webs Network
      Custom Joomla & Wordpress Websites
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 85563
    • Thanks: 10983
    • Web Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 6 months ago
    • Please note that by answering your own post you take yourself out of the MODS "unanswered posts" queue and therefore might have to wait longer for a response - it's better to edit your original post so this does not happen.

      We have been fixing all the Gantry 4 templates that have this issue and we believe we have issue new releases that have address them all - so what template are you using please and is it the latest version?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Dan Walker's Avatar
    • Dan Walker
    • Hero Rocketeer
    • Posts: 476
    • Thanks: 14
    • Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 6 months ago
    • We have a number of sites where we have customized with the Gantry 4 Default Template v4.1.32, as I have already mentioned. The sites work with php 7.0, but not with php 7.1. To confirm, I have created a site with the Gantry 4 Rocket Launcher ( which only works with php 5.6), updated Joomla and again, the site works with php 7.0, but not php 7.1. I would appreciate RT updating the G4 Default Template to work with php 7.1, as you have for the other G4 templates.
    • Dan Walker - Web Designer & Developer @ Top Webs Network
      Custom Joomla & Wordpress Websites
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 85563
    • Thanks: 10983
    • Web Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 6 months ago
    • It seems that one got overlooked and an update will be out in due course.

      In the meantime you can fix it yourself... see screenshot. An array is being initialise as quote-quote instead of [] - php7.1 is much stricter than previous versions in this regard.

      Regards, Mark.
    • The following users have thanked you: Dan Walker

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 5 months ago
    • MrT wrote:
      It seems that one got overlooked and an update will be out in due course.

      Hello,
      It has been over a month since the oversight was acknowledged. Any update as to when the default G4 template will be php 7.1 compatible?

      I also wanted to ask about the fix you proposed in the picture. There is a post by reggie here
      www.rockettheme.com/forum/general-discus...-fix?start=0#1333963
      and the proposed fix there is different from what you posted here in the picture.

      **EDIT**
      I have tested both proposed fixes and they both work.

      The original code on line 68 looks like this:
      $ul_css = '';
      Your fix is to replace the '' with [] (left and right brackets)
      $ul_css = [];
      The fix Reggie posted, while different, also works
      $ul_css = array();
      So this begs the question, while both work, is there one that is considered to be more correct?


      regards, Michael
    • Last Edit: 2 years 5 months ago by MICHAEL KOONTZ. Reason: Added code to ask a better question after testing was done.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 85563
    • Thanks: 10983
    • Web Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 2 years 5 months ago
    • It doesn't matter which is used - they both mean the same thing... an empty array.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • mustafa_s's Avatar
    • mustafa_s
    • Jr. Rocketeer
    • Posts: 33
    • Thanks: 0

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 10 months 2 weeks ago
    • I'm just bimping this thread up for awareness.

      I upgraded to PHP 7.1.23, Joomla 3.9.1, Gantry 4.1.37 and every single component/plugin was updated... yet I still got the error which the OP referred to: Error: [] operator not supported for strings: [] operator not supported for strings

      I had to go into /templates/gantry/html/mod_roknavmenu/themes/gantry-dropdown/layout.php and apply the fix as instructed by Mr.T

      I would have assumed this fix would be incorporated already, ohh well.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 85563
    • Thanks: 10983
    • Web Designer/Developer

    Re: SOLVED Gantry 4 Default Template Doesn't Work with Php 7.1

    Posted 10 months 2 weeks ago
    • mustafa_s - I suspect that you updated Gantry FRAMEWORK but did not update Gantry TEMPLATE - you need to update BOTH.

      The fix IS in the Gantry 4 TEMPLATE.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.091 seconds