When I'm in an empty sys folder and try to create a new record, I directly end up with this error message:
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Trying to access array offset on value of type null in yoast_seo/Classes/Form/Element/SnippetPreview.php line 202
Long story short: I think the main problem is, that EXT:yoast_seo tries to generate a preview URL for not yet existing record which doesn't make sense at all.
How can we reproduce this behavior?
use RecordUtility::configureForRecord() for a custom table
Please give us a description of what happened.
I'm using the
RecordUtility
to add Yoast SEO fields to a custom table:When I'm in an empty sys folder and try to create a new record, I directly end up with this error message:
I debugged the
SnippetPreview
a little bit and it seem that the wrong record is queried: https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/c1e4ae93d7de523696a5d94cad19154237813e27/Classes/Form/Element/SnippetPreview.php#L171 In my case, the both parameters where the table name specified above and as$recordId
the uid of my sys_folder was used.Long story short: I think the main problem is, that EXT:yoast_seo tries to generate a preview URL for not yet existing record which doesn't make sense at all.
How can we reproduce this behavior?
RecordUtility::configureForRecord()
for a custom tableTechnical info