2

All prior upgrades were smooth so I'm surprised to be getting errors.

These are the errors I've seen so far:

A PHP Error was encountered

Severity: Warning

Message: array_merge(): Argument #1 is not an array

Filename: libraries/Functions.php

Line Number: 2373



A PHP Error was encountered

Severity: Notice

Message: Undefined property: EE_Template::$layout_conditionals

Filename: libraries/Template.php

Line Number: 3375



A PHP Error was encountered

Severity: Warning

Message: array_merge(): Argument #4 is not an array

Filename: libraries/Template.php

Line Number: 3375

Other pages are broken, can't seem to determine any errors even with error logging on.

A plain template works fine, no errors. I'll use this space to share other errors and what I figure out if anything at all.

Won't have time to take templates apart tonight so will pick up tomorrow.

6

Stash 2.5.3 will stop this error notice with EE 2.8.x

The problem was: in EE 2.8 the Template::advanced_conditionals() method assumes that the Template::$layout_conditionals array exists, even if your template does not make use of the new 'layouts' feature. Is that a bug for Ellislab to fix? Arguably, yes.

Stash v2.5.3 adds a workaround for this problem, as does IfElse v2.0.1 if you use that as well.

It's possible there may be a small number of other add-ons affected if they call the advanced_conditionals() method of the Template class.

2
  • Yeah I got a notice from github and upgraded immediately. Very good timing as I was about to start flipping out because of some conditions that weren't working ... or rather were working with bizarre behavior haha. Having parse_conditionals back is such a relief!!!
    – notacouch
    Apr 9 '14 at 20:25
  • The updates Mark described here fixed the errors shown in my original question. As Marc Miller mentioned below the new safe="whatever" (anything but that isn't 1|on|yes|y) parameter in IfElse may address other issues/errors with conditionals. Stash's parse_conditionals parameter still doesn't necessarily work. However, I didn't spend time looking into which cases reintroducing it was fine and which ones would cause a page to break.
    – notacouch
    Apr 17 '14 at 18:19
2

Try to disable one by one your modules, addons and analyse the results after disabled each one.

2
  • Instead of disabling add-ons and messing things up I'd prefer to take tags/portions out of templates one by one or piece by piece. Or rather the other way around, since bare templates are okay, then introduce things one by one til breaking commences. Thanks, though.
    – notacouch
    Mar 18 '14 at 18:03
  • 2
    I know it's not easy at all. I already had the same problem, I resolved after disabling one by one the addons, a lot of headache!!
    – Stéphane
    Mar 18 '14 at 18:17
2

We ran into this issue and it ended up being related to Stash. I'd start there if you have it installed.

5
  • That's what I was thinking, the first thing I did was upgrade Stash... which wasn't sufficient. Thanks for the hint! This'll be rough since I make heavy use of stash. may as well take this as a chance to use Layouts.
    – notacouch
    Mar 18 '14 at 18:04
  • 1
    I will try to using EE2.8 Layouts because php cod inside Stash layout, doesn't work.
    – Stéphane
    Mar 18 '14 at 18:20
  • 1
    I'm getting this error on just one of my templates after upgrading to 2.8.1. I have Stash installed, but it is not used on this template. I do have Switchee installed on this template, but the error only appears on the Default="yes" conditional. Still digging. The other templates that have Stash and/or Switchee are not getting this error. Mar 18 '14 at 20:05
  • So far inside a stash:embed {exp:stash:set parse_conditionals="yes"} breaks the page even with a simple conditional, but I cannot replicate the error in a bare template.
    – notacouch
    Mar 26 '14 at 18:20
  • another problem with stash embed is I was trying to use {stash:_variable} to pass the category for {exp:channel:entries}, but apparently it was coming out as some weird hash or not at all. saving the embed variable via {exp:stash:set} off the bat within the embed seems to "fix" that.
    – notacouch
    Mar 26 '14 at 20:46
2

I got this issue after upgrading to 2.8.1 from 2.7.3

I had Stash installed, but only got this error one one template that didn't use Stash.

I got this error on a page that had Switchee. Then inside the default Case of Switchee, I had Croxton's IfElse running around an advanced conditional.

I removed the IfElse tags around the advanced conditional and the error message went away.

UPDATE: Mark Croxton updated the IFELSE plugin to address this. There is a new safe="no" parameter in version 2.0.1. Updating and using this parameter works for me.

https://github.com/croxton/Ifelse/tree/feature/unsafe_conditionals

4
  • So far I actually needed to start using switchee for basic conditionals to avoid errors. Inside {exp:stash:set} at least.
    – notacouch
    Mar 26 '14 at 18:10
  • Definitely am getting errors introducing IfElse with regular conditionals. Conditionals themselves may not always yield errors. This is with IfElse on the tag v2.0.0. gunna try upgrading now.
    – notacouch
    Mar 28 '14 at 19:54
  • Yep. 2.0.1 and its safe="no" param fixed the errors.
    – notacouch
    Mar 28 '14 at 20:15
  • 1
    Mark Croxton updated IfElse again, fixes one of the issues I was having with Stash. It's same version # but there's a minor, yet important update.
    – notacouch
    Apr 10 '14 at 0:44
1

In file system/expressionengine/libraries/Template.php

add variable

var $layout_conditionals = array();

before

public function __construct()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.