Hi,

Upon installing this module, I received this error when visiting the 'Text formats and editors' administration page:

User error: Invalid placeholder (!version) in string: PHP Typogrify Version: !version in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 242 of /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Component/Render/FormattableMarkup.php) #0 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/includes/bootstrap.inc(582): _drupal_error_handler_real(256, 'Invalid placeho...', '/Applications/M...', 242, Array) #1 [internal function]: _drupal_error_handler(256, 'Invalid placeho...', '/Applications/M...', 242, Array) #2 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Component/Render/FormattableMarkup.php(242): trigger_error('Invalid placeho...', 256) #3 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(196): Drupal\Component\Render\FormattableMarkup::placeholderFormat('PHP Typogrify V...', Array) #4 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render() #5 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/twig/twig/lib/Twig/Environment.php(467) : eval()'d code(77): Drupal\Core\StringTranslation\TranslatableMarkup->__toString() #6 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_d9ba33b419251a129f0079229881e5a0ab1a02fe7c82104a8bcd03827f78045b->doDisplay(Array, Array) #7 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #8 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #9 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #10 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/cla...', Array) #11 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('item_list', Array) #12 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #13 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #14 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #15 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #16 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #17 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #18 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) #19 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #20 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #21 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #22 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #23 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #24 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #25 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #26 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #27 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #31 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #32 /Applications/MAMP/htdocs/au.gov.dta.test/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #33 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #34 /Applications/MAMP/htdocs/au.gov.dta.test/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #35 {main}.

This seems to be due to use of the '!' placeholder instead of '@'.

I am working on a patch and will submit shortly.

Cheers,
Jesse.

Comments

imperator_99 created an issue. See original summary.

imperator_99’s picture

StatusFileSize
new10.2 KB

Please find attached patch.

rootwork’s picture

Status: Active » Reviewed & tested by the community

Patch applies on dev. It looks like this is just a followup to #2829664: Fix t()-function and !-placeholders, catching some that were missed there.

imperator_99’s picture

@rootwork yeah I actually missed that one when I ran into my issue but if mine covers more, excellent.

rivimey’s picture

Just noting that patch #2 is in use by me and works fine.

benjifisher’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Thanks for working on this and testing it!

Unfortunately, the patch here conflicts with the one in #2829664: Fix t()-function and !-placeholders, which was already committed. I am setting this issue back to NW and adding the issue tag for a reroll.

rpayanm’s picture

Status: Needs work » Needs review
StatusFileSize
new4.36 KB
benjifisher’s picture

Issue tags: -Needs reroll

It seems that the original problem described in the issue summary here was already fixed by #2829664: Fix t()-function and !-placeholders.

As I said in #6 above, the patch in #2 no longer applies. The patch in #7 does not really match the description of this issue, but it does seem to be a step in the right direction. I am changing the status of this issue to RTBC, and I will apply the patch to the dev version.

  • benjifisher committed bd84dff on 8.x-1.x authored by rpayanm
    Issue #2953490 by imperator_99, rpayanm, rivimey, rootwork: Invalid...
benjifisher’s picture

Status: Needs review » Fixed

Oops, I removed the "Needs reroll" tag in my previous comment, but I forgot to update the status. Too late now: this issue is Fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.