- 🇨🇦Canada joel_osc
Re-rolling this patch because it does provide some nice functionality, but removing the changes to cm_revision_delete_get_latest_default_revision as from my testing the previous code was working properly and the new code was definitely broken.
- 🇨🇦Canada joel_osc
Attempt #2, fixing missing DevelForm.php in previous patch.
- 🇨🇦Canada joel_osc
I have tested the above patch and it seems to work. I would like at least one more set of eyes on it before bringing it in so i will leave this as needs review for now. Thanks everyone for all of your work.
- Status changed to RTBC
over 1 year ago 3:18pm 8 March 2023 - 🇨🇦Canada smulvih2 Canada 🍁
@mrshowerman yes I see what you mean about
getLatestTranslationAffectedRevisionId()
not always returning the default revision. Looks like the patch in #16 addresses this (reverts my changes tocm_revision_delete_get_latest_default_revision()
). Tested #16 and works great! Will put this to RTBC but will wait for our QA team to review this in more detail before moving forward with the merge. - Status changed to Needs review
over 1 year ago 8:33pm 3 April 2023 - 🇨🇦Canada smulvih2 Canada 🍁
We are getting reports that nodes without a published revision get all drafts besides the latest are being deleted. In the case where no published revisions exist, all drafts should be left untouched. I have updated the cm_revision_delete_get_node_candidate() function to account for this (only return nodes that have at least one published revision). I have also updated the devel form to identify if the node in question is a candidate or not, and if it is it will display the revisions that will be deleted.
- 🇨🇦Canada smulvih2 Canada 🍁
Issue with the way I created the last patch. New patch attached.
- Status changed to RTBC
over 1 year ago 8:52pm 24 April 2023 -
smulvih2 →
committed 01fb490e on 1.1.x
Issue #3324883 by smulvih2, joel_osc: Fix algorithm for candidate...
-
smulvih2 →
committed 01fb490e on 1.1.x
- Status changed to Fixed
over 1 year ago 9:23pm 24 April 2023 - 🇨🇦Canada smulvih2 Canada 🍁
Thanks for all the work on this guys! This has been included in 1.1.3.
Hello all,
After upgrading to 1.1.3 and visiting the admin link (/admin/config/content/cm_revision_delete) I get the error message below.
The problem disappears when I downgraded to 1.1.2. I am using Drupal 9.5.8 on PHP 8.1.16 and 10.6.11-MariaDB-0ubuntu0.22.04.1. Not sure if I should include this bug in this issue or elsewhere?
Thanks for all your work.
The website encountered an unexpected error. Please try again later.
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "cm_revision_delete.devel" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Menu\LocalTaskDefault->getRouteParameters() (Line: 310)
Drupal\Core\Menu\LocalTaskManager->getTasksBuild() (Line: 358)
Drupal\Core\Menu\LocalTaskManager->getLocalTasks() (Line: 95)
Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender()
call_user_func_array() (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788)
Drupal\Core\Render\Renderer->doCallback() (Line: 374)
Drupal\Core\Render\Renderer->doRender() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 43)
__TwigTemplate_adf422af4faba65a60c110b1816dd7b8->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86)
__TwigTemplate_cdf27144588ac30aff3b7f000179defe->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 163)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 46)
Drupal\redirect_after_login\RedirectMiddleware->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 49)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)- 🇨🇦Canada smulvih2 Canada 🍁
@elneto thanks for reporting this. I have 1.1.3 installed on drupal/core 9.5.8 as well and it is working for me. If you look at the routing file in the root of the module you will see that route is defined. Can you please try deleting the module folder and running composer install again? Also make sure no other patches are being applied to this module.
Automatically closed - issue fixed for 2 weeks with no activity.