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

Support archive

Can't create new variables

Caroline C. Blaker 10 Jun 2019 18:18 problem, complete

EE: 5.2.3
LV: 3.2.0

I click Create New Variable and I get the following error:

Fatal error: Uncaught Error: Call to a member function accepts_content_type() on boolean in /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php:681 Stack trace: #0 /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(1001): Grid_lib->get_grid_fieldtypes() #1 /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php(892): Grid_lib->getGridFieldtypeDropdownForColumn(NULL) #2 /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/ft.grid.php(503): Grid_lib->get_column_view() #3 /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/ft.grid.php(546): Grid_ft->getSettingsVars() #4 /home/vagrant/Code/clientName/deploy/ee-system/user/addons/low_variables/types/type.low_variables.php(186): Grid_ft->display_settings(Array) #5 /home/vagrant/Code/clientName/deploy/ee-system/user/addons/low_variables/types/low_grid/vt.low_grid.php(34): Low_variables_type->call_ft('display_setting...', Array) #6 /home/vagra in /home/vagrant/Code/clientName/deploy/ee-system/ee/EllisLab/Addons/grid/libraries/Grid_lib.php on line 681

Replies

  1. Low 11 Jun 2019 06:42

    Looking at the stack trace, this isn't something LV can fix.

    LV calls the native Grid field to display its settings and field itself. Beyond that, LV can't do much but hope Grid does its thing without errors.

    The first line of the stack trace mentions

    Call to a member function accepts_content_type() on boolean


    ...which happens on line 681 of the Grid_lib.php file. That reads:

    $fieldtype->accepts_content_type('grid')


    Just before that, the $fieldtype var is set, thusly:

    $fieldtype = $ft_api->setup_handler($field_short_name, TRUE);


    This happens in a loop where Grid gets a list of installed fieldtypes enabled for Grid. Apparently, for one of those fieldtypes, the setup_handler method returns a boolean (probably FALSE), after which EE tries to call the now non-existent 'accepts_content_type' function on it.

    So there you have it. An error caused by Grid after LV calls it. Looks like you might want to check which Grid-enabled (3rd-party) fields you have enabled in your installation and see if one triggers this action. If they're all native, ping EllisLab.

  2. Caroline C. Blaker 11 Jun 2019 18:26

    I ping'd ellislab and here was the fix - I was missing a fieldtype called "grid file" INSERT INTO 'exp_fieldtypes' ('name', 'version', 'settings', 'has_global_settings')
    VALUES ('file_grid','1.0.0','YTowOnt9','n')

    Thanks for your attention to this.