Plugin Version: 5.x-5.x-dev (2016-Jul-07)

Every time i open a page that uses linkit i get this error on the logs:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 125 of C:\inetpub\venus\core\lib\Drupal\Core\Entity\EntityTypeManager.php).

This is how my link looks like in ckeditor:

<a class="myclass" data-entity-type="node" data-entity-uuid="a6sfgrr-8840-4bdf0-a7b8-acd87f743c6d" href="node/932">Mylink</a>

am i missing something or is this a bug?

Thanks.

Comments

wolfhowling created an issue. See original summary.

anon’s picture

That is a bug for sure.

But it strange that the error message reports an empty entity name.

This is probably caused by the linkit_filter.

anon’s picture

Can you try the lastes dev again?

I think this is solved with http://cgit.drupalcode.org/linkit/diff/linkit.module?id=d0fcf48

wolfhowling’s picture

after updating the same issue repeats, further more the error now repeats 25 times for only 3 links in a page before it repeated about 5

anon’s picture

Category: Bug report » Support request

further more the error now repeats 25 times for only 3 links in a page before it repeated about 5

That doesn't make sense at alls. Check your markup for all links. Some of them must have en empty data-entity-type attribute.

Moving this to a support request, as I cant reproduce this on a fresh install.

anon’s picture

Category: Support request » Bug report

Ok, now I got the same error. Some links are having empty data attributes.

anon’s picture

To reproduce:

  • Add link to something that's not returning any suggestions, i.e. an external link

The link will have empty data attributes.

  • anon committed d0ab4fa on 8.x-5.x
    Issue #2762847 by anon: PluginNotFoundException
    
anon’s picture

Status: Active » Fixed

Committed a fix.

wolfhowling’s picture

The fix is working, i had to re-add the links but it is not longer creating the empty data attributes Thanks a lot.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tbisciglia’s picture

I found that Linkit is incompatible with the Builder module, which is used to create row/column output as a simpler and less configurable alternative to Paragraphs. Since the builder system isn't entity-based, it at least suggests why these two modules don't play nicely together and why the error is for a missing entity type.

I'd also guess that there are other content-type contrib modules that have the same issues, so definitely check your content-based contrib modules if you have the same issue happen and the above methods don't resolve it (as they didn't for me).