After upgrading to 8.7.1 I suddenly encounter the following error while adding media or paragraphs on node creation:
entity cannot have a URI as it does not have an ID.
This takes me to node_tokens() in node.tokens.inc where a URL is created for a (not yet) existing node and breaks creation:
case 'url':
$replacements[$original] = $node->toUrl('canonical', $url_options)->toString();
break;
case 'edit-url':
$replacements[$original] = $node->toUrl('edit-form', $url_options)->toString();
break;
After patching the node_tokens() like so:
case 'url':
$replacements[$original] = !$node->isNew() ? $node->toUrl('canonical', $url_options)->toString() : t('not yet available.');
break;
case 'edit-url':
$replacements[$original] = !$node->isNew() ? $node->toUrl('edit-form', $url_options)->toString() : t('not yet available.');
break;
This works as initially expected.
Does anybody else encounter this issue or is something else going on?
Thanks for feedback.
Comments
Comment #2
smanhoff commentedComment #5
darvanenAt face value this looks like a problem with the author's site, needs steps to reproduce on a clean installation of Drupal.
As that is the case and there has been no activity here for 2 years and 4 months, I'm marking this "Postponed (maintainer needs more info)". If we don't receive additional information to help with the issue, it may be closed after three months.
Comment #8
kristen polThanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" a year ago and there has been no activity here since that time.
It was previously noted that the issue could be closed after 3 months and that was 12 months ago.
Given that and, since we still need more information to move forward with this issue and that information wasn't provided, I'm marking the issue "Closed (cannot reproduce)".
Thanks!