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

Fatal Error on 5.2.2 when adding new fields

Development and Programming

Chad Crowell's avatar
Chad Crowell
242 posts
6 years ago
Chad Crowell's avatar Chad Crowell

Exactly this problem is what I am seeing:

link

This site went from 2.11.4 > 5.2.2. I added the debug code as suggested in that thread to Grid_lib.php:677 and get this:

string(9) "file_grid" 
Fatal error: Uncaught Error: Call to a member function accepts_content_type() on boolean in /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php:684 Stack trace: #0 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(1004): Grid_lib->get_grid_fieldtypes() #1 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(895): Grid_lib->getGridFieldtypeDropdownForColumn(NULL) #2 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/ft.grid.php(503): Grid_lib->get_column_view() #3 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/ft.grid.php(546): Grid_ft->getSettingsVars() #4 /Users/Chad/Sites/augi/site/system/ee/legacy/libraries/api/Api_channel_fields.php(410): Grid_ft->display_settings(Array) #5 /Users/Chad/Sites/augi/site/system/ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(226): Api_channel_fields->apply('display_setting...', Array) #6 /Users/Chad/Sites/augi/site/system/ee/EllisLab/ExpressionEngine/Model/Content/Fie in /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php on line 684

I know file_grid is a new fieldtype for drag and drop uploads, but I am not using it on my site. I don’t see it in exp_fieldtypes, nor in exp_channel_fields or exp_matrix_fields. Can I get some direction please?

       
Chad Crowell's avatar
Chad Crowell
242 posts
6 years ago
Chad Crowell's avatar Chad Crowell

To follow up on this, I still have no resolution. After also going through this thread my result is:

..."email_address" string(3) "rte" string(4) "text" string(6) "select" string(11) "fluid_field" string(12) "multi_select" string(8) "duration" string(9) "file_grid" 
Fatal error: Uncaught Error: Call to a member function accepts_content_type() on boolean in /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php:681 Stack trace: #0 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(1001): Grid_lib->get_grid_fieldtypes() #1 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(892): Grid_lib->getGridFieldtypeDropdownForColumn(NULL) #2 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/ft.grid.php(503): Grid_lib->get_column_view() #3 /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/ft.grid.php(546): Grid_ft->getSettingsVars() #4 /Users/Chad/Sites/augi/site/system/ee/legacy/libraries/api/Api_channel_fields.php(412): Grid_ft->display_settings(Array) #5 /Users/Chad/Sites/augi/site/system/ee/EllisLab/ExpressionEngine/Model/Content/FieldFacade.php(226): Api_channel_fields->apply('display_setting...', Array) #6 /Users/Chad/Sites/augi/site/system/ee/EllisLab/ExpressionEngine/Model/Content/Fie in /Users/Chad/Sites/augi/site/system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php on line 681

again showing that file_grid is what is causing the issue. I know this is a new fieldtype, but I can’t find it. It doesn’t have a folder in my system/ee/ellislab/addons folder, its not shown in the core add ons page (neither is grid or relationships, not sure if that matters), it just doesn’t seem to exist in this 5.2.2 site. I really need to solve this, can someone help?

       
Chad Crowell's avatar
Chad Crowell
242 posts
6 years ago
Chad Crowell's avatar Chad Crowell

I did a fresh install of 5.2.2 and also don’t see a file_grid fieldtype folder, so it must live elsewhere. I can’t find it. My main site didn’t show file_grid in the field types table, so I added it, but still get the same error on add field page.

       
Chad Crowell's avatar
Chad Crowell
242 posts
6 years ago
Chad Crowell's avatar Chad Crowell

I found the file_grid field files, in the grid field type folder. So that’s that. Still no help for my error.

       
marie18's avatar
marie18
1 posts
6 years ago
marie18's avatar marie18

Hi there, I’ve faced the same issue, please help.

Thanks in advance https://popup-builder.com/

       
studio codeur's avatar
studio codeur
3 posts
5 years ago
studio codeur's avatar studio codeur

Hi There. Same problem here.

       
studio codeur's avatar
studio codeur
3 posts
5 years ago
studio codeur's avatar studio codeur

Hi There. Same problem here.

       
DorothyDorothy's avatar
DorothyDorothy
3 posts
5 years ago
DorothyDorothy's avatar DorothyDorothy

I also have this issue. I tried updating to EE v5.2.6 but this did not solve the issue

It manifests itself in the CP when I try to edit a channel /cp/channels/edit/<channel_number>

I added a try catch to line 681 of Grid_lib.php

try {
    if ( ! $fieldtype->accepts_content_type('grid') ||
     ($this->content_type != 'channel' && $field_short_name == 'relationship'))
    {
     unset($fieldtypes[$field_short_name], $compatibility[$field_short_name]);
    }

   } catch (\Throwable $th) {
    var_dump($fieldtype);
    echo "field name " . $field_short_name . "
";
   }

I get

> bool(false) field name file_grid

Do I need to reinstall grid and if so how?

       
DorothyDorothy's avatar
DorothyDorothy
3 posts
5 years ago
DorothyDorothy's avatar DorothyDorothy

** Hoorah! ** I looked in exp_fieldtypes on another site that I have that is using ee5.1.2 and found that there was an entry called file_grid which is missing in the site with the error.

I simply added the following record to the exp_fieldtypes table:

30 file_grid 1.0  n

The number 30 is just the auto increment for the record. I didn’t even have to work out what to do with the settings. I hope that this helps someone else.

       

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.