Using per filter settings have a notice, and the option decode entities is not save.

Notice: Undefined index: decode_entities in Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter->generalHighlightTagsSettings() (line 547 of modules/custom/geshifilter/src/Plugin/Filter/GeshiFilterFilter.php).

Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter->generalHighlightTagsSettings() (Line: 397)
Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter->settingsForm(Array, Object) (Line: 166)
Drupal\filter\FilterFormatFormBase->form(Array, Object) (Line: 22)
Drupal\filter\FilterFormatEditForm->form(Array, Object) (Line: 115)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('filter_format_edit_form', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 43)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line:

Comments

yukare created an issue. See original summary.

  • yukare committed a085f2c on 8.x-1.x
    Issue #2825069 by yukare: Notice with decode_entities with per filter...
yukare’s picture

Assigned: yukare » Unassigned
Status: Active » Needs work

The previous commit fix the issue, but we need tests for this, so keep it open.

codeqq’s picture

Solution:
======

in drupal/modules/geshifilter/src/Plugin/Filter/GeshiFilterFilter.php

change all occurrences of

$this->settings['decode_entities']

to

$this->settings['general_tags']['decode_entities']

i.e., add "['general_tags']" between "$this->settings" and "['decode_entities']"

RATIONALE:
========
A careful inspection will show that "this->settings" is an array like the following:
---------------------------------

general_tags :
  tags : code blockcode
  tag_styles :
    1 : 1 
    2 : 2 
    4 : 4 
    8 : 8 
  decode_entities : 1 
per_language_settings :
  table :
    language :
      asp :
        tags : <asp>
      bash :
        tags : <bash>
...

---------------------------------
It clearly shows "decode_entities" is seated in "general_tags".

yukare’s picture

Status: Needs work » Fixed

This was fixed, just not close.

Status: Fixed » Closed (fixed)

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