I tested the patch in #16 and am getting:
Warning: preg_match(): Unknown modifier 't' in Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->build() (line 510 of modules/contrib/easy_breadcrumb/src/EasyBreadcrumbBuilder.php).
- Status changed to Needs review
over 1 year ago 10:08am 15 June 2023 - 🇮🇳India supriya1992
#16 is working fine with regular expression without any error/warning.
I attached the screenshot of the configuration and before/after applying patches.
The "Paths to be excluded while generating segments" value should be a valid regex and shouldn't start and end with "/". "/" is already implemented in the code. - First commit to issue fork.
- last update
about 1 year ago 6 pass - Status changed to Needs work
about 1 year ago 8:58am 7 November 2023 I've rebased the merge request. So I can try and implement the fixes provided in #16 with all the latest code in 2.x-dev. I'm getting a similar error as @bhouge in #20. This comes down because this takes the whole line a preg_match (in my example
node/3
), and the problem here is because/
is unescaped.That said even when I escape it as @supriya1992 did, it doesn't correctly match when I go to
/node/3
page, because we are trying to compare the whole string to the last path element (In my case were trying to comparenode\/3
to3
).Also, her config should not work in the first place
report/2[0-9][0-9][0-9]
should only validate to strings starting withreport/2
and ending with 3 characters inclusive between 0 and 9, so a valid match would bereport/2123
Testing with Drupal 10.1 and PHP 8.1.
- last update
about 1 year ago 6 pass - last update
about 1 year ago 6 pass - Status changed to Needs review
about 1 year ago 9:39am 7 November 2023 Changed it so now it compares to
$check_path
and not$target_segment
, also changed the description so it's visible that forward slashes have to be escaped with a backslash. Needs review.- Status changed to Needs work
10 months ago 7:27pm 14 February 2024 - 🇺🇸United States Greg Boggs Portland Oregon
The MR needs a rebase against the latest release.
- last update
10 months ago 6 pass Rebased against the latest release, DrupalCI is passing but for some reason, GitlabCI is not. And I'm not sure it's failing because of changes in this code. Could someone check this? For that reason leaving it as needs works.
- last update
10 months ago 6 pass - 🇺🇸United States Greg Boggs Portland Oregon
Thanks Admirlju!
I believe the Gitlab fail is coding standards which is pretty small, and we have another ticket for getting standards to pass, I'm going to merge.
-
Greg Boggs →
committed 9a5d41dd on 2.x authored by
Suresh Prabhu Parkala →
Issue #3196198 by admirlju, Suresh Prabhu Parkala, vinaygawade,...
-
Greg Boggs →
committed 9a5d41dd on 2.x authored by
Suresh Prabhu Parkala →
This still isn't working for me ...
I am trying to exclude layout pages from displaying breadcrumbs, so this is what I'm putting in the "Paths to be excluded while generating segments" field:
node\/[0-9]+\/layout
But when I go to /node/8/layout, the breadcrumb is still there.
I am using version 2.0.6 of the module.
I tried the module as-is, then I tried patching using MR!31, then I tried downloading 31.patch and applying that way. Nothing seems to work. What am I missing?
- 🇺🇸United States Greg Boggs Portland Oregon
Unfortunately, they dev release is not ready yet. This issue still needs an MR and tests passing:
https://www.drupal.org/project/easy_breadcrumb/issues/3440889 🐛 Broken findMatchingRedirect() call Fixed
- Status changed to Fixed
7 months ago 7:55pm 9 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States joakland
Reopening this issue. I'm on Drupal 10.3.1 using v2.0.7 of this module. Exclusion paths are throwing an error in all cases, regex or not. Here's the stack trace:
Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->build(Object) (Line: 83) Drupal\Core\Breadcrumb\BreadcrumbManager->build(Object) (Line: 73) Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build() (Line: 171) Drupal\block\BlockViewBuilder::preRender(Array) call_user_func_array('Drupal\block\BlockViewBuilder::preRender', Array) (Line: 113) Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\block\BlockViewBuilder::preRender', 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: 870) Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\block\BlockViewBuilder::preRender', Array) (Line: 432) Drupal\Core\Render\Renderer->doRender(Array) (Line: 504) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248) Drupal\Core\Render\Renderer->render(Array) (Line: 475) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 78) __TwigTemplate_18fd583981cfc99363aff62dcde205fe->doDisplay(Array, Array) (Line: 360) Twig\Template->yield(Array) (Line: 335) Twig\Template->render(Array) (Line: 38) Twig\TemplateWrapper->render(Array) (Line: 33) twig_render_template('themes/contrib/seven/templates/page.html.twig', Array) (Line: 348) Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 491) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248) Drupal\Core\Render\Renderer->render(Array) (Line: 475) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 87) __TwigTemplate_17782acc4d8ccae26dac5db17dcdc334->doDisplay(Array, Array) (Line: 360) Twig\Template->yield(Array) (Line: 335) Twig\Template->render(Array) (Line: 38) Twig\TemplateWrapper->render(Array) (Line: 33) twig_render_template('themes/contrib/seven/templates/classy/layout/html.html.twig', Array) (Line: 348) Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 491) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248) Drupal\Core\Render\Renderer->render(Array) (Line: 158) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 159) 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: 53) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->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: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
- Status changed to Postponed: needs info
5 months ago 10:05am 2 August 2024 - 🇩🇪Germany spuky
you did not change the Status to open...
-> so I did that for you...but i can't reproduce that error message... could you share more about your config and how to reproduce your issue ?
- 🇩🇪Germany spuky
tried also with seven also working
could it be that you are not escaping your entered paths
path/test
would give you warning (with the call stack mentioned) Warning: preg_match(): Unknown modifier 't' in ...
path\/test
would work
- Status changed to Fixed
4 months ago 10:11am 13 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.