Account created on 16 May 2011, about 14 years ago
#

Merge Requests

More

Recent comments

🇨🇦Canada joseph.olstad

still reviewing this, it might not actually be working at all and possibly introduces a regression.

🇨🇦Canada joseph.olstad

Another CK5 bug to fix
Added label / anchor use case to the issue summary, described below

CKEditor 4 accepted this:

<li class="checkbox" id="chbx-p2">
<input class="action-checkbox-2 cb-dmm" id="eg5-2" type="checkbox">
<label for="eg5-2">You hold a federal wine licence issued by the Canada Revenue Agency (CRA) under 
<a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017">section&nbsp;14 of the <cite>Excise Act, 2001</cite></a>, valid at the time you apply to the program and up to or after March&nbsp;31,&nbsp;2026
</label>
</li>

CKEditor 5 turns the above into this (SURPRISE!):

<li class="checkbox" id="chbx-p2">
<input class="action-checkbox-2 cb-dmm" id="eg5-2" type="checkbox"> 
<label for="eg5-2">You hold a federal wine licence issued by the Canada Revenue Agency (CRA) under </label>
<a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017"><label for="eg5-2">section&nbsp;14 of the&nbsp;</label></a>
<cite><a href="https://laws-lois.justice.gc.ca/eng/acts/e-14.1/page-2.html#h-179017"><label for="eg5-2">Excise Act, 2001</label></a></cite>
<label for="eg5-2">, valid at the time you apply to the program and up to or after March&nbsp;31,&nbsp;2026</label>
</li>
🇨🇦Canada joseph.olstad

D11 compatibility was merged into the 2.0.x branch a while ago, forgot to publish a tag though.

What's the difference between 2.0.x and 3.0.x? Why the new branch?

Should explain this in the project page or release notes and README.md.

We've been using 2.0.x-dev with Drupal 11 for a few months now , not sure how extensively it's been used but it's deployed in production since a few months and I haven't heard of any complaints yet.

🇨🇦Canada joseph.olstad

Cool, thanks for testing, this is on my radar 100%, I'd like to test a few of my multilingual setups , we tend to publish and unpublish both of our languages at the same time.

🇨🇦Canada joseph.olstad

It's that time again!

Drupal 11 support , any volunteers?
💬 Drupal 11 compatibility Needs work

🇨🇦Canada joseph.olstad

Hello Jay, I'm sending the same message to you as I am sending to Sándor Juhász.

Your module is appreciated by over 2000 enthusiasts. They have started migrating to Drupal 11 however will not be able to take advantage of your module in Drupal 11 since it's currently not advertising it'self as compatible. There's a merge request ready for you, imho, should be an easy win.

https://www.drupal.org/project/iek/issues/3430975 📌 Automated Drupal 11 compatibility fixes for iek Needs review

I recommend moving forward with fix. Then please tag a release so that we are able to install this wonderful module in Drupal 11 with ease.

Thank you,

Joseph Olstad

🇨🇦Canada joseph.olstad

I've reached out to the maintainers.

Sent this message:

Hello Maintainer1, I'm sending the same message to you as Maintainer2 and Maintainer3.

Your module is appreciated by over 2000 enthusiasts. They have started migrating to Drupal 11 however will not be able to take advantage of your module in Drupal 11 since it's currently not advertising it'self as compatible. There's a couple merge requests that are ready for review, imho, should be an easy win.

https://www.drupal.org/project/ape/issues/3428169 📌 Automated Drupal 11 compatibility fixes for ape Needs review

AND

https://www.drupal.org/project/ape/issues/3520321 🐛 Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/ape/src/Form/SettingsForm.php Active

I recommend moving forward with fixes to ensure that these two issues are fixed. Then please tag a release so that we are able to install this wonderful module in Drupal 11 with ease.

Thank you,

Joseph Olstad

🇨🇦Canada joseph.olstad

Is anyone maintaining this project? Drupal 11.2.0 will be released in a few weeks from now. It's been a full year since 11.0.0. It's time that this gets in.

Please co-ordinate this above fix with this fix for PHP 8.3+ also required for D11:

🐛 Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/ape/src/Form/SettingsForm.php Active

🇨🇦Canada joseph.olstad

ok sure, sounds like a good idea. I'll plan to do some testing on this in the comming weeks . Meanwhile I applaud any others wishing to help review and test this.

🇨🇦Canada joseph.olstad

We've started reducing scope 📌 Defer disruptive 11.3 deprecations for removal until 13.0 Active , scaling back.

  • All that is left is to increase the number of minor releases to accomodate symfony 8 in Drupal 11.8+.
  • Modify the Drupal core release schedule to stretch out Drupal 11 by 4 years, throw a postpone party, everyone gives hi-5s and kudos!

All this is justified by the following:

Increasing velocity for:

  • Drupal CMS
  • Drupal 11
  • Recipes (Drupal marketplace)
  • Worlds (Drupal marketplace)

Lets put Drupal into maximum overdrive , high gear!

We need a huge postpone party for Drupal 12 and tell the world how great Drupal 11 and Drupal CMS are and get some enthusiasm going for the soon to be updated roadmap and crank up the volume on the extra 4 years for Drupal 11.

There's a path forward!

🇨🇦Canada joseph.olstad

update issue summary with link mentioned by @ptsimard.

🇨🇦Canada joseph.olstad

There's a few options for moving modules out a the profiles folder, there is a composer entry for this , could modify the path.

There's a few different options. We'll see how this unfolds.

🇨🇦Canada joseph.olstad

Install profile still functioning correctly in Drupal 11 with WxT.

With that said, investigate how we can carefully transition over to recipes, whether or not this is possible without breaking things.

🇨🇦Canada joseph.olstad

Ok great, thanks for this, it looks very good.

If we're happy with it, put it in the 2.0.x dev , and then let it simmer in there for a while.

🇨🇦Canada joseph.olstad

We should close this when the upstream toc_filter patch is committed/resolved/fixed.

🇨🇦Canada joseph.olstad

this was not tagged so there's no need to publish a release to revert.

🇨🇦Canada joseph.olstad

Now with the fix in 🐛 Not possible to unselect the checkbox Active , no longer need a convoluted way to get the boolean value. $this->value works from a custom views filter plugin based on the Boolean filter base class when using a single checkbox option.

Upgrade bef and use the code in the merge request from 2921024 which hopefully will be merged ASAP.

🇨🇦Canada joseph.olstad

the workaround mentioned above had issues, so we explored the related patch and went with the patch solution instead.

🇨🇦Canada joseph.olstad

This is fixed by the patch/merge request in:
🐛 Not possible to unselect the checkbox Active

To resolve, upgrade to 7.1.x-dev and apply the merge request patch from 2921024

🇨🇦Canada joseph.olstad

ok, I tested this solution again, it works well!

Thank you very much @smustgrave

🇨🇦Canada joseph.olstad

Same issue in better_exposed_filters 7.1.x-dev

Tested with and without the merge request patch from 🐛 Not possible to unselect the checkbox Active

same issue

🇨🇦Canada joseph.olstad

Seems to be the right approach, I will test this patch now

🇨🇦Canada joseph.olstad

Ok I have figured out a solution for this, here is the crux of it:

mymodule.views.inc


use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Implements hook_views_data_alter().
 */
function mymodule_views_data_alter(array &$data) {
  $data['paragraphs_item_field_data']['include_session_paragraph'] = [
    'title' => new TranslatableMarkup('Show event sessions'),
    'help' => new TranslatableMarkup('Show event "session" paragraphs toggle filter.  When off/false, only calendar_entry paragraphs are included in the results.'),
    'filter' => [
      'id' => 'include_session_paragraph',
      'group' => 'MyModule',
    ],
  ];
}

src/Plugin/views/filter/IncludeSessionParagraph.php


namespace Drupal\mymodule\Plugin\views\filter;

use Drupal\views\Plugin\views\filter\BooleanOperator;
use Drupal\Core\Form\FormStateInterface;

/**
 * Controls paragraph filtering by presence of field_title (i.e. calendar_entry only).
 *
 * @ingroup views_filter_handlers
 *
 * @ViewsFilter("include_session_paragraph")
 */
class IncludeSessionParagraph extends BooleanOperator {

  /**
   * Workaround for BEF checkbox filters.
   */
  public function acceptExposedInput($input) {
    if (!parent::acceptExposedInput($input)) {
      return FALSE;
    }

    // If the filter value is not present in the input, reject.
    // This is the critical fix for BEF + Single On/Off checkbox.
    $identifier = $this->options['expose']['identifier'];
    if (!array_key_exists($identifier, $input)) {
      return FALSE;
    }

    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  protected function defineOptions() {
    $options = parent::defineOptions();
    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['value']['#title'] = $this->t('Show event sessions');
  }

  /**
   * {@inheritdoc}
   */
  public function query() {
    $identifier = $this->options['expose']['identifier'];
    $input = $this->view->getExposedInput();
    $include_sessions = isset($input[$identifier]) && $input[$identifier] === '1';

    if (!$include_sessions) {
      $alias = $this->query->ensureTable('paragraph__field_title', 'paragraphs_item_field_data');
      $this->query->addWhereExpression(1, "$alias.field_title_value IS NOT NULL");
    }
  }


}

So this filter is added and in bef configured as a single checkbox in the advanced options of bef

The crux was adding the acceptExposedInput method which sets up the expose identifier and adjusting the query method to capture the input

(from the query method) like this:

    $identifier = $this->options['expose']['identifier'];
    $input = $this->view->getExposedInput();
    $include_sessions = isset($input[$identifier]) && $input[$identifier] === '1';

So, I got it working without a patch.

Otherwise the value is always true no matter what was selected so could not use $this->value , instead use the approach mentioned above until this is fixed.

🇨🇦Canada joseph.olstad

@smustgrave, please reopen this, Andypost is correct, this patch needs to be ported. I'm using Drupal 10.4 with a checkbox exposed bef , the issues reported by Andy Post relating to the patch that needs porting is still unresolved for 8.x-3.x or whatever it's called now.

🇨🇦Canada joseph.olstad

Thanks for reporting,

Please provide a pull request or patch for this change.

🇨🇦Canada joseph.olstad

@joel_osc , actually I think it's MR6 that is the gotcha , @liam morland combined two patches into one. With that said, I'm going dizzy looking at patches all day long.

Ideally some of these fixes eventually get merged so that we don't have to use so many patches.

🇨🇦Canada joseph.olstad

@smulvih2 , not sure if this patch even works anymore, although it doesn't appear to cause any harm.

🇨🇦Canada joseph.olstad

@natemow, as a maintainer it is your responsibility to check the box next to the contributors name at the bottom of issues marked as "Fixed".

  • acidaniel at Phase2 for Phase2 3 patches
  • prasaddeole
  • nisha_j
  • damienmckenna

Please look for these account names in this issue, put a checkbox beside them, so they get credit for their contribution!

What this does is re-enforce the desire to contribute and it helps us identify who is actively contributing to Drupal!

🇨🇦Canada joseph.olstad

@natemow, as a maintainer it is your responsibility to check the box next to the contributors name at the bottom of issues marked as "Fixed".

  • acidaniel at Phase2 for Phase2 4 patches

Please look for these account names in this issue, put a checkbox beside them, so they get credit for their contribution!

What this does is re-enforce the desire to contribute and it helps us identify who is actively contributing to Drupal!

🇨🇦Canada joseph.olstad

@natemow, as a maintainer it is your responsibility to check the box next to the contributors name at the bottom of issues marked as "Fixed".

  • valeriasalis 1 patches attached 2 comments made
  • natemow at Interactive Strategies 2 comments made
  • damienmckenna at Third and Grove

Please look for these account names in this issue, put a checkbox beside them, so they get credit for their contribution!

What this does is re-enforce the desire to contribute and it helps us identify who is actively contributing to Drupal!

🇨🇦Canada joseph.olstad

I'd like to support paragraphs, if a client sponsors this I'll develop it. Otherwise I could mentor someone to build this.

🇨🇦Canada joseph.olstad

@smulvih2, great work on this custom filter that fixes this issue! Amazing! Was ready to call an ambulance after I saw this bug, but now all that is needed is a call to Guiseppe and Bob.

🇨🇦Canada joseph.olstad

Not only failing but no longer applying to the latest core 11.1.7

Production build 0.71.5 2024