We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

undefined offset libraries/Grid_parser.php

Development and Programming

brandmovers's avatar
brandmovers
2 posts
12 years ago
brandmovers's avatar brandmovers

EE v2.7.2

A PHP Error was encountered Severity: Notice Message: Undefined offset: 22 Filename: libraries/Grid_parser.php Line Number: 155

A PHP Error was encountered Severity: Notice Message: Undefined offset: 22 Filename: libraries/Grid_parser.php Line Number: 372

In my template, I have the following grid field, the short name of the field is called: cholesterol:

{cholesterol}
    {cholesterol:cholesterol} {cholesterol:daily_value}
{/cholesterol}

I removed everything on the page, except that above, and it still displays an error. I know the field is filled in for that channel entry I am viewing.

I have a grid field working in another channel/channel field group/template, but none of the grid fields in this field group are working.

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
12 years ago
Kevin Cupp's avatar Kevin Cupp

To eliminate potential weirdness, can you try renaming your “cholesterol” column to something else so that it’s not the same name as the parent field? I thought having both be the same name should work but give it a try just in case.

       
brandmovers's avatar
brandmovers
2 posts
12 years ago
brandmovers's avatar brandmovers

That did the trick, odd that they don’t have a check in for that. Either the code needs to be fixed to anticipate that possibility or validate the short_names against the grid sub field names.

       
moki's avatar
moki
26 posts
11 years ago
moki's avatar moki

I’m seeing the same PHP error message:

A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 30
Filename: libraries/Grid_parser.php
Line Number: 157

I’m using a Grid field on EE 2.7.3 that has a relationship field in the grid.

I tried renaming the grid, but to no avail. This is my template code:

{menus_to_display}
     <li class="tabs tabs-menu">
      <a href="#tab{menus_to_display:count}%22id=%22trigger{menus_to_display:count}" class="tabs-menu">_       {menus_to_display:listing}_        {menus_to_display:listing:title}_       {/menus_to_display:listing}_      </a>
     </li>
    {/menus_to_display}

{menus_to_display} is the grid field, {menus_to_display:listing} is the relationship field in the grid field.

This shouldn’t be a namespace issue… anyone have any ideas?

       
Feaatsy's avatar
Feaatsy
1 posts
2 years ago
Feaatsy's avatar Feaatsy

How about you

       
RichardLewis's avatar
RichardLewis
1 posts
about 2 years ago
RichardLewis's avatar RichardLewis

Has this issue been resolved yet? If not, please refer to getting over it, maybe you will find a solution.

       
lejale's avatar
lejale
2 posts
one year ago
lejale's avatar lejale

You’re encountering a PHP Notice: Undefined Offset in Grid_parser.php, which typically means ExpressionEngine (EE) Sprunki is trying to access an array index that doesn’t exist. Since it’s occurring on line 155 and line 372, it likely has to do with how EE is parsing your Grid field data.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.