Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/1.x/79 no link to root #96

Merged
merged 4 commits into from
Nov 2, 2023
Merged

Fix/1.x/79 no link to root #96

merged 4 commits into from
Nov 2, 2023

Conversation

rupertj
Copy link
Member

@rupertj rupertj commented Nov 2, 2023

Fixes #79

@finnlewis
Copy link
Member

@rupertj Fresh install on this branch.

Create a new publication page:

Warning: Trying to access array offset on value of type null in localgov_publications_tokens_alter() (line 26 of modules/contrib/localgov_publications/localgov_publications.tokens.inc).

localgov_publications_tokens_alter(Array, Array, Object) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('tokens', Array, Array, Object) (Line: 373)
Drupal\Core\Utility\Token->generate('node', Array, Array, Array, Object) (Line: 241)
Drupal\Core\Utility\Token->doReplace(1, '[node:title] | [site:name]', Array, Array, Object) (Line: 191)
Drupal\Core\Utility\Token->replace('[node:title] | [site:name]', Array, Array, NULL) (Line: 66)
Drupal\metatag\MetatagToken->replace('[node:title] | [site:name]', Array, Array) (Line: 768)
Drupal\metatag\MetatagManager->processTagValue(Object, Array, Array, , 'en') (Line: 614)
Drupal\metatag\MetatagManager->generateRawElements(Array, Object) (Line: 550)
Drupal\metatag\MetatagManager->generateElements(Array, Object) (Line: 524)
metatag_get_tags_from_route() (Line: 278)
_metatag_remove_duplicate_entity_tags(Array) (Line: 220)
metatag_entity_view_alter(Array, Object, Object) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('node_view', Array, Object, Object) (Line: 304)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 238)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 797)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 386)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

@finnlewis
Copy link
Member

@rupertj fixed that warning with e260406

The situation arises when you create a publication page but do not put it in a book, which I guess is very possible for a single page publication.

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, thanks @rupertj !

@rupertj
Copy link
Member Author

rupertj commented Nov 2, 2023

Cool. Thanks for testing :)

@rupertj rupertj merged commit 0023945 into 1.x Nov 2, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No link to root of publication in menu
2 participants