Hey there, I'm on Drupal 8.9 and the version 1.1 works just fine but the 1.2 is totally crashing.
The tab links are not appearing anymore.
In the /admin/content there is this error multiple times:
Notice: Undefined property: Drupal\views\ResultRow::$node_field_data_langcode in Drupal\publishcontent\Plugin\views\field\PublishContentNode->render() (line 67 of modules/contrib/publishcontent/src/Plugin/views/field/PublishContentNode.php).
Drupal\publishcontent\Plugin\views\field\PublishContentNode->render(Object) (Line: 1155)
Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender(Object) (Line: 238)
template_preprocess_views_view_field(Array, 'views_view_field', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_view_field', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 1746)
Drupal\views\Plugin\views\field\FieldPluginBase->theme(Object) (Line: 770)
Drupal\views\Plugin\views\style\StylePluginBase->elementPreRenderRow(Array)
call_user_func_array(Array, Array) (Line: 100)
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. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 709)
Drupal\views\Plugin\views\style\StylePluginBase->renderFields(Array) (Line: 576)
Drupal\views\Plugin\views\style\StylePluginBase->renderGrouping(Array, Array, 1) (Line: 468)
Drupal\views\Plugin\views\style\StylePluginBase->render(Array) (Line: 2170)
Drupal\views\Plugin\views\display\DisplayPluginBase->render() (Line: 1533)
Drupal\views\ViewExecutable->render() (Line: 183)
Drupal\views\Plugin\views\display\Page->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('content', Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func_array(Array, Array) (Line: 100)
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. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
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('kernel.view', Object) (Line: 156)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->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: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
rodrigoaguileraI'll have a look later.
Comment #4
rodrigoaguileraHello
I just uploaded a fix for the warning you reported.
I did a fresh installation of the module and I can see the tabs fine.
What do you have configured in /admin/config/workflow/publishcontent ?
I'll make a release as soon as we discover the reason why your tabs are not displaying
Comment #5
letrollpoilu commentedHi there, thanks for your help.
I updated to Drupal 8.9.2 today and I had the same issue. Attached is my content view configuration, nothing really.
Comment #6
rodrigoaguileraI just setup a test site
https://stm5f217c913adb5-a5szvnn1ivwdhpt3yvcuk5prjp6suvxn.tugboat.qa/adm...
Added the publish/unpublish column, tested and all looks fine.
If you have multilingual site, have you tried to use the dev version with the fix from above applied?
I am going to need more info to know what is happening.
Comment #7
rodrigoaguileraComment #8
letrollpoilu commentedHey, thanks for looking into it.
I indeed have the Language module enabled because another module was needing it, but I only have one language enabled. I don't know which information I can give you otherwise :( It's not too bad anyway. I think I'll just wait for version 1.3 to see if this is working on my views again.
Comment #9
dangreenman commentedI was able to solve this problem by setting a default language for the site.
See:
/admin/config/regional/settings
Set a language and refresh the cache.
Comment #10
letrollpoilu commentedThanks for your help!
Below is what I see on /admin/config/regional/settings
Am I missing something?
Comment #11
dangreenman commentedSorry but I was wrong and I have mislead you.
I thought this solution had done the trick but my cache fooled me.
The problem continued on my installation as well.
I have attached the patch I made to fix it.
Try that.
Comment #12
rodrigoaguileraJust to clarify, The patch proposed is equivalent to the fix that is now on the dev branch
https://git.drupalcode.org/project/publishcontent/commit/cd2974d
can be used as a patch with the following URL
https://git.drupalcode.org/project/publishcontent/commit/cd2974d.patch
Comment #13
dangreenman commentedThanks rodrigoaguilera. Cheers for your work and this module!