All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Fatal Error after updating from EE4 to EE 5.3.0

Jared Chesebro 11 Dec 2019 17:56 problem, complete

When i try to edit a variable after updating to EE5 I get the following error:

Fatal error: Uncaught Error: Call to a member function accepts_content_type() on bool in /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/libraries/Grid_lib.php:681 Stack trace: #0 /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(1001): Grid_lib->get_grid_fieldtypes() #1 /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(892): Grid_lib->getGridFieldtypeDropdownForColumn(NULL) #2 /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/ft.grid.php(503): Grid_lib->get_column_view() #3 /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/ft.grid.php(546): Grid_ft->getSettingsVars() #4 /Volumes/MC2dev/localhost/coadn.local/public_html/library/user/addons/low_variables/types/type.low_variables.php(186): Grid_ft->display_settings(Array) #5 /Volumes/MC2dev/localhost/coadn.local/public_html/library/user/addons/low_variables/types/low_gr in /Volumes/MC2dev/localhost/coadn.local/public_html/library/ee/EllisLab/Addons/grid/libraries/Grid_lib.php on line 681

Replies

  1. Low 12 Dec 2019 07:46

    Looks like Grid is trying to access a fieldtype that isn't compatible.

    Do you get the same error when you try and create a channel field of the Grid type? Because it doesn't look like something LV causes; more like a rogue field throwing a spanner in the works...

  2. Jared Chesebro 12 Dec 2019 19:18

    I was able to narrow down that it's specifically file_grid fieldtype. EEharbor was able to help solve.

    I replaced:

    "if ( ! $fieldtype->accepts_content_type('grid') ||"

    on line 681 of Grid_lib.php with:

    "if (empty($fieldtype) || ! method_exists($fieldtype, 'accepts_content_type') || ! $fieldtype->accepts_content_type('grid') ||"

    And that solved it.

    BTW, you were correct that I couldn't add a field anywhere in the CP.

    EEHarbor is going to dig in and probably release the fix in a future version of EE if they can find the root cause.

  3. capstonedesign 15 May 2020 14:05

    OMG, finding this solution helped me fix this for a client of mine. Thank you, Jared!

  4. Jared Chesebro 15 May 2020 14:47

    capstonedesign, unfortunately, EE has their hands full and haven't been able to track down the permanent solution to the issue so this will have to be patched every time you update.