0

Just wondering if anyone else has seen lots of error messages appearing at the top of their pages (when logged in) after upgrading to 2.8.1? (I jumped a few versions with this upgrade, so it may affect other versions, too.) Errors such as

A PHP Error was encountered
Severity: User Warning
Message: Invalid EE Conditional Variable: {if ""y"}
Filename: libraries/Functions.php
Line Number: 2640

and

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/username/system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 442

and this one multiple times per page:

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: category_name
Filename: helpers/segment_helper.php
Line Number: 98

I don't know what to do about all this, so any suggestions appreciated.

  • What version did you start at before the upgrade? – Jeremy Gimbel Apr 11 '14 at 21:16
  • I'm embarrassed to say it was 2.2. – ralph.m Apr 12 '14 at 5:01
  • I would recommend carefully going over your conditionals. I'm not sure which version it was, but somewhere between 2.2 and 2.8 there were some changes to the way conditionals get parsed that can result in errors if they're not quite up to snuff. – Jeremy Gimbel Apr 13 '14 at 1:56
  • Thanks Jeremy. Combing carefully through the templates atm. Hard on the eyes, though! – ralph.m Apr 17 '14 at 23:11
3

The first error indicates that some if-statement in your template is wrong. Maybe you have a " sign to much? If this error is on all pages maybe some embeded template has it - if not it can be in a specific template. See this:

{if ""y"}

The second PHP-error just tells you theres been some output to the browser before the standard output (the template) has been sent. So you can ignore that one for now. It'll disappear when the others are corrected.

For the last error I would go through my template to see how your are using the variable {category_name} in your templates.

  • Cool, thanks for those suggestions, @naboovalley. I'll check those things out and report back. :) – ralph.m Apr 11 '14 at 8:45
  • Maybe you have a " sign to much?. Hm, couldn't find one anywhere. And I wasn't getting errors before the upgrade. see how your are using the variable {category_name} in your templates. I don't think I'm using it at all. I couldn't find it in any of the templates, anyhow. – ralph.m Apr 12 '14 at 5:26
2

I've been getting the same "Undefined variable: category_name" since I upgraded to 2.8.1. It only shows up when I'm using Super Search which I figured was needing to be updated to support EE 2.8.1. Super Search ver 2.1.4 was released on April 8 and the error persists after upgrading.

Thankfully, the error only shows when logged in which the client and visitors shouldn't see. When are you specifically seeing this error show? Are you using Super Search?

I'm not using the variable "category_name" anywhere in my templates. I'm embedding a header and footer into the results template and removing each embed will lower the amount of errors it shows so it's depending on how many templates are used to render the page and 'category_name' is not used on any of those templates.

If you're using Super Search as well, then I plan to send a request to them (since v2.1.4 didn't fix it), but if it's completely unrelated then the bug should be reported to EE.

  • Thanks Steve. I don't think I've used "category_name" either. Not using anything like Super Search either. – ralph.m Apr 12 '14 at 5:27
  • It's already been reported in the bug report with a hot fix: support.ellislab.com/bugs/detail/20152 – Steve Garcia Apr 17 '14 at 11:59
  • Well spotted, Steve. Thanks for the link. :) – ralph.m Apr 17 '14 at 23:12

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.