Hmm, you might be right @vensires, it could simply be related to the Paragraphs module. There are still some bug reports and forum posts about orphaned paragraphs, so that seems to be a thing.
I thought it might have to do with this issue since the node edit form doesn't list the (not anymore) referenced paragraph anymore (so the paragraph shouldn't be "related" to the host anymore) and "Delete orphaned composite entities" on /admin/config/system/delete-orphans didn't remove any paragraphs.
I tried patch #176 and patch #219 and they both solved the issue so the referenced content showing up in views (#176 with an older, stable release of the module, and #219 with the latest dev release). However, I'm not able to remove a paragraph from a view in either version/patch.
If I edit a node and remove a paragraph, the view still includes the removed paragraph. As a contextual filter I tested both "Paragraph revision: Parent ID" and "Paragraph: Parent ID" and added a filter criteria "Paragraph revision: Is Latest Revision", to see whether it makes a difference.
Unfortunately it didn't help and now I'm left with a "ghost paragraph".
Just saw that there has been a lot of work on that issue. Just wanted to say thanks to fix things. Much appreciated!
Thank you for looking into the issue @abhishek_gupta1
The outcome is still the same, but now with a slightly different error message:
Deprecated function: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\typogrify\Typogrify::widont() (line 203 of [Drupal root]/web/modules/contrib/typogrify/src/Typogrify.php)
#0 [Drupal root]/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 [Drupal root]/web/modules/contrib/typogrify/src/Typogrify.php(203): preg_replace()
#3 [Drupal root]/web/modules/contrib/typogrify/src/Typogrify.php(224): Drupal\typogrify\Typogrify::widont()
#4 [Drupal root]/web/modules/contrib/typogrify/src/TwigExtension/Typogrify.php(45): Drupal\typogrify\Typogrify::filter()
#5 [Drupal root]/vendor/twig/twig/src/Environment.php(360) : eval()'d code(64): Drupal\typogrify\TwigExtension\Typogrify::filter()
#6 [Drupal root]/vendor/twig/twig/src/Template.php(394): __TwigTemplate_eb27fdd977272c00be557825c92b6f9b->doDisplay()
#7 [Drupal root]/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#8 [Drupal root]/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#9 [Drupal root]/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render()
#10 [Drupal root]/web/core/themes/engines/twig/twig.engine(39): Twig\TemplateWrapper->render()
#11 [Drupal root]/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#12 [Drupal root]/web/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render()
#13 [Drupal root]/web/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#14 [Drupal root]/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render()
#15 [Drupal root]/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#16 [Drupal root]/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext()
#17 [Drupal root]/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#18 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#19 [Drupal root]/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#20 [Drupal root]/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#21 [Drupal root]/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#22 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#23 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#24 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#25 [Drupal root]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\ContentLength->handle()
#26 [Drupal root]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#27 [Drupal root]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#28 [Drupal root]/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle()
#29 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle()
#30 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#31 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#32 [Drupal root]/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#33 [Drupal root]/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#34 [Drupal root]/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#35 {main}
So already closer to the intended beaviour :)
maenjuel β created an issue.
I tried a thing or two and I think I narrowed down where the error comes from.
First of all, I also tried on Drupal 10.2.2 just to make sure the error also appears with newest core version (and it does ;)).
So, said error appears when a sitemap type has "Views URL generator" selected under /admin/config/search/simplesitemap/types/[type]
If the "Views URL generator" is removed from the "URL generators" selection field, uninstalling the module is no problem. If the selection is there, uninstalling the module throws an error.
I also just had an error trying to uninstall the module, maybe related to this issue Views might be part of it?
The logs show the following error after trying to uninstall the module:
AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "views" plugin does not exist. Valid plugin IDs for Drupal\\simple_sitemap\\Plugin\\simple_sitemap\\UrlGenerator\\UrlGeneratorManager are: entity, index, arbitrary, entity_menu_link_content, custom" at [Drupal root]/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53', referer: [site]/admin/modules/uninstall/confirm
The error appeared when I tried to uninstall both sub modules at the same time, but the "Simple XML Sitemap (Views)" sub module was uninstalled after anyway.
Uninstalling "Simple XML Sitemap (Search engines)" first and then uninstalling "Simple XML Sitemap (Views)" worked. However, uninstalling the "Simple XML Sitemap" module (the "main" module, so to speak) threw the same error, and can't be uninstalled.
Views and Views UI are both installed, in case that would be relevant.
Tested on Drupal 10.0.9 and Simple XML sitemap 4.1.8.
maenjuel β created an issue.
Awesome, with the file from the issue fork it works indeed. Thank you so much for looking into it!
Thank you for your input @tolstoydotcom. Yes, I can see the UUID using your code.
The problem seems specifically to be with term UUIDs only, I can use node UUIDs with pathauto, for example.
maenjuel β created an issue.
maenjuel β created an issue.
After posting here, I stumbled upon that solution as well as @lostcarpark. Indeed it does the trick. Thanks for getting back at me and documenting it for other people who might encounter the same problem.
For views, typogrify could be applied in specific views templates, i.e. like this {{ fields.title.content|typogrify }}
#20 does the trick for nodes, but when I visit /admin/content or a view where I display the node title, I get the following error:
AH01071: Got error 'PHP message: TypeError: preg_split(): Argument #2 ($subject) must be of type string, array given in [drupal root]/web/modules/contrib/typogrify/src/SmartyPants.php on line 1343 #0 [drupal root]/web/modules/contrib/typogrify/src/SmartyPants.php(1343): preg_split()\n#1 [drupal root]/web/modules/contrib/typogrify/src/SmartyPants.php(269): Drupal\\typogrify\\SmartyPants::tokenizeHtml()\n#2 [drupal root]/web/modules/contrib/typogrify/src/Typogrify.php(218): Drupal\\typogrify\\SmartyPants::process()\n#3 [drupal root]/web/modules/contrib/typogrify/src/TwigExtension/Typogrify.php(39): Drupal\\typogrify\\Typogrify::filter()\n#4 [drupal root]/web/sites/default/files/php/twig/63f28b52e004b_page-title.html.twig_nHmMQSGyX8r5q48osUipCs1t0/ho1qwEkSF0cd_ek5utcVkhFFL_JTTl_-qPCPhjoH3uU.php(53): Drupal\\typogrify\\TwigExtension\\Typogrify::filter()\n#5 /var/custome...', referer: [page I'm coming from]