Problem to publish news
Closed this issue · 1 comments
Hello, I am trying to "tune" my local installation, but for example, when
I try to create a news, I have the following problem (*)
(Do I need install any drupal modules? do you have user manual to help to configure the appareance like https://joinup.ec.europa.eu?)
(*)
The website encountered an unexpected error. Please try again later.
Error: Call to a member function bundle() on null in Drupal\joinup_core\JoinupRelationManager->getParentELibraryCreationOption() (line 119 of modules/custom/joinup_core/src/JoinupRelationManager.php).
Drupal\joinup_core\JoinupRelationManager->getParentELibraryCreationOption(Object) (Line: 107)
Drupal\joinup_core\ProxyClass\JoinupRelationManager->getParentELibraryCreationOption(Object) (Line: 124)
Drupal\joinup_core\Guard\NodeGuard->allowedCreate(Object, Object, Object) (Line: 111)
Drupal\joinup_core\Guard\NodeGuard->allowed(Object, Object, Object) (Line: 186)
Drupal\state_machine\Plugin\Workflow\Workflow->isTransitionAllowed(Object, Object) (Line: 152)
Drupal\state_machine\Plugin\Workflow\Workflow->getAllowedTransitions('draft', Object) (Line: 235)
Drupal\state_machine\Plugin\Field\FieldType\StateItem->getAllowedStates('draft') (Line: 207)
Drupal\state_machine\Plugin\Field\FieldType\StateItem->getSettableOptions(Object) (Line: 116)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase->getOptions(Object) (Line: 34)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget->formElement(Object, 0, Array, Array, Object) (Line: 67)
Drupal\joinup_core\Plugin\Field\FieldWidget\StateMachineButtons->formElement(Object, 0, Array, Array, Object) (Line: 335)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 85)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 171)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 122)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 115)
Drupal\node\NodeForm->form(Array, Object) (Line: 117)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('node_news_form', Object) (Line: 275)
Drupal\Core\Form\FormBuilder->buildForm('node_news_form', Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object) (Line: 113)
Drupal\node\Controller\NodeController->add(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 666)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
I guess you are trying to use the user 1 or similar to create directly a news, right?
In Joinup news can be created only in scope of a collection, and never from the admin links.
So the correct flow is to:
- log as admin and create two terms in the policy domain vocabulary. One needs to be a child of the other;
- log as a generic user (
user
should be available); - go to
/propose/collection
(this is needed on a fresh new installation, otherwise a tile will be available in the/collections
page); - create a collection and press
propose
; - from the homepage of the collection, click the "plus" menu and create a news from there.
Please note that the collection and all the related content won't be visible unless a moderator approves the collection. This is done by logging in as moderator, clicking on your icon and then dashboard (/dashboard
) to find the unpublished content waiting approval.
We should probably document the workflow more indeed.