linkit icon indicating copy to clipboard operation
linkit copied to clipboard

Call to a member function getClassHandle() on null

Open edolyne opened this issue 7 years ago • 3 comments

Current Install:

CraftCMS version: 2.6.2968 LinkIt version: 2.3.4

With this installed, and attempting to create or edit entries that use a LinkIt field type I am getting a internal server error of: Call to a member function getClassHandle() on null

The runtime logs show:

#17 /storage/av04327/www/craft/plugins/fruitlinkit/fieldtypes/FruitLinkItFieldType.php(136): Craft\TemplatesService->render('fruitlinkit/_fi...', Array)
#18 /storage/av04327/www/craft/app/vendor/twig/twig/lib/Twig/Template.php(615): Craft\FruitLinkItFieldType->getInputHtml('buttonLink', '')

edolyne avatar Apr 06 '17 02:04 edolyne

It looks like this issue is only arising when a LinkIt field is within a matrix, when the field is outside of a matrix field everything functions appropriately.

edolyne avatar Apr 08 '17 14:04 edolyne

Also receiving the same error.

I had just enabled a custom element type to be selectable.

Running Craft 2.6.3002 and Linkit 2.3.4

lukepearce avatar Apr 13 '18 15:04 lukepearce

I ran into this issue as well. In my case, it was caused because I had failed to select any Link Types for the field. It was also inside a matrix, but I did not test it outside of a matrix.

kotyy avatar Jan 22 '19 19:01 kotyy