LinkCollection::_getLinkTypeHandle()Argument ($data) is null
Closed this issue · 2 comments
Describe the bug
I had a Craft 3 site which used Typed link field, I converted these to Hyper when I upgraded to Craft 4, which I thought all went well.
Having updated this to Craft 4.9 I noticed that some entries have an issue when trying to access them in the CMS and on the frontend verbb\hyper\models\LinkCollection::_getLinkTypeHandle(): Argument #1 ($data) must be of type array, null given, called in /var/www/html/vendor/verbb/hyper/src/models/LinkCollection.php on line 38
.
I have since upgrade the project to Craft 5, the issue is still present.
This issue isn't specifically connected to Craft 4 or Craft 5, but possibly connected converting the field types or something else.
I understand this maybe a unique issue, but I wanted to know f there was a way to either add the correct data for these fields or get access to the entries so that I can add fresh links.
I have tested adding new Hyper links to entries, these all work fine.
Steps to reproduce
- Craft 3 with Typed link fields
- Upgrade to Craft 4 and convert to Hyper
These steps may not cause the issue exactly, the root cause of the issue is unclear.
Craft CMS version
Craft 4.9 and Craft 5
Plugin version
2.x and 3.x
Multi-site?
No
Additional context
No response
Yeah sounds like something has gone maybe amiss with the migration from Typed Link for some content. I've seen a lot of inconsistencies with Typed Link's content, which is making it tricky to migrate everyone over 100%. For example, some sites have links in one format, other links in an older format.
I could only really get to the bottom of it if you shoot through your database before you switched to Hyper — which you're welcome to do so at support@verbb.io
, but understand if that boat has already sailed.
But that error should be fixed for the next release. To get this early, run composer require verbb/hyper:"dev-craft-5 as 2.0.1"
.
Thanks @engram-design. This was some time ago, so no luck with an old database, however I can confirm I am able to view the entries in the CP and frontend with the latest update.
Thanks for sorting.