Account created on 14 May 2008, over 17 years ago
#

Merge Requests

More

Recent comments

🇸🇪Sweden peter törnstrand

Using the instructions from the test module. If you add field.field.node.article.field_stillthere as a config dependency in the role you at least get a warning when you delete the file.

🇸🇪Sweden peter törnstrand

Wish I had found that test before. Was a minor fix adding a test for this scenario. Well, I learned something at least.

🇸🇪Sweden peter törnstrand

Yeah, I tried having the input/output directly in the test case but it was completely unreadable. Concatenated strings with lots of PHP_EOL. It was difficult to spot and fix errors caused by formatting.

I'm using a data provider but the provider reads the input/output from the fixture files.

Regarding the function _filter_autop() in a separate file; that was just something i noticed in the System module.

Should I move the input/output into the test case again?

And perhaps I should go with @berdir's input and move the _filter_autop() to the FilterAutoP plugin and deprecate the global function?

🇸🇪Sweden peter törnstrand

From @berdir in #contribute slack channel

we want to move all functions to classes anyway. with underscored ones, it's a bit unclear if we want to provide BC or not, but you could play it safe and add a deprecated message. and then depending on where it is used, move it to the class, or a trait or static method.

My gut feeling was to put _filter_autop() in the Drupal\filter\Plugin\Filter\FilterAutoP class .. perhaps directly in the ::process() method.

And then just add a deprecation note on _filter_autop() in filter.module:

@deprecated in drupal:11.x.x and is removed from drupal:12.x.x. Use Drupal\filter\Plugin\FilterAutoP::process() instead.

🇸🇪Sweden peter törnstrand

So this was a bit more complex than I imagined as the test requires a call to the global function _filter_autop(). I looked at the documentation at https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/unit-tes... but I am not sure I got this right. I tried looking at how this is solved in other core modules and found what I believe is relevant examples in system/tests/fixtures.

I also posted in the Drupal Slack channel #contribute but have not gotten any answers yet.

I did however have lots of fun doing this.

🇸🇪Sweden peter törnstrand

Reproducing the problem by following the steps outlined I can also see the node label in the content overview view (/admin/content) although the label is not linked to the node.

The only entity that defines a "view label" permission is Taxonomy with the "view vocabulary labels" permission. Do you propose we introduce a new "view node labels" permission? Should there also be "view block labels", "view user labels"?

As anonymous user I can see the "label" of a user.

🇸🇪Sweden peter törnstrand

I was not able to reproduce this error using latest core 11.x (11.3-dev) and a browser (Web 48.4 - The GNOME project, webkit based) configured with the preferred language English (United Kingdom). The language chosen during installation was English, British.

The translation file drupal-11.3-dev.en-gb.po was downloaded to sites/default/files/translations directory and imported during site installation.

One translation file imported. 829 translations were added, 0 translations were updated and 0 translations were removed.

🇸🇪Sweden peter törnstrand

I could not reproduce this error with latest core 11.x and using the following browser:

  • Firefox 141.0.3 (Linux)
  • Web (The GNOME project) 48.4
  • Chromium 139.0.7258.138 (Linux)

To remove the default value of the timestamp field I could just uncheck the Set default value checkbox.

🇸🇪Sweden peter törnstrand

Sorry, forgot MR. Will have a look at creating a test. Question, can I include the test in the same MR?

🇸🇪Sweden peter törnstrand

Suggestion:

@param array|string $base
  A list or a single base_table, for example 'node'. Pass '#global' to
  return the global Views handlers for the requested $type.
🇸🇪Sweden peter törnstrand

Was able to reproduce this with core 11.2.3. Fix attached.

Markup after fix applied:

<ul>
<li>Here is a list Item.</li>
<li><p>Here is another list item, this time containing a line break which is converted by the filter to a br tag.<br />
This is some more text followed by two line breaks, which the filter converts to a p tag.</p>
<p>And now some more text.</p></li>
</ul>
🇸🇪Sweden peter törnstrand

Fixed, thank you for reporting this error!

Released in version 2.1.1.

🇸🇪Sweden peter törnstrand

Thanks. Will have a look and create new release ASAP.

🇸🇪Sweden peter törnstrand

peter törnstrand changed the visibility of the branch 3526923-tests to active.

🇸🇪Sweden peter törnstrand

peter törnstrand changed the visibility of the branch 3526923-tests to hidden.

🇸🇪Sweden peter törnstrand

peter törnstrand changed the visibility of the branch 3526923-tests to hidden.

🇸🇪Sweden peter törnstrand

Also look into how we can prevent <span class="claro-details__summary-summary"></span> from being injected into our tree widget.

🇸🇪Sweden peter törnstrand

Yes, using $this->moduleHandler->invokeAll('form_node_form_alter', [&$form, &$form_state]); does result in an infinite loop.

🇸🇪Sweden peter törnstrand

Works like expected. Thanks! Released in 1.0.3.

🇸🇪Sweden peter törnstrand

I think we will leave the UI as is for now. If any great ideas turn up in the future we can create a new issue.

🇸🇪Sweden peter törnstrand

This is being worked on in the same branch as Drag and drop positioning of new menu item Active ... had a little to many issues going on at once.

🇸🇪Sweden peter törnstrand

@jdewit since you have been very active in this modules issue queue perhaps you would like to review this?

🇸🇪Sweden peter törnstrand

I'm not sure how we can improve on the UI for multiple menus. With Drag and drop positioning of new menu item Active it should be easy to drag an menu item across multiple menus and that would make putting the menus in different tabs for example not work very well.

🇸🇪Sweden peter törnstrand

Ok, this was fixed in 📌 Drupal standarts of JS (Jquery) Active which has not been included in any new release. I will create a new release right away.

🇸🇪Sweden peter törnstrand

I think I have fixed this in branch 3526919-drag-and-drop already. Will backport that fix ASAP.

🇸🇪Sweden peter törnstrand

Made some progress on this in branch 3526919-drag-and-drop ... ran into trouble when calculating a weight for a new item between two existing items with weights having "no room in between".

How do I set a weight between weights -48 and -47?

🇸🇪Sweden peter törnstrand

This sounds very resonable. Will have a look.

🇸🇪Sweden peter törnstrand

Fixed in DEV, will be in release 1.0.1.

🇸🇪Sweden peter törnstrand

Sorry, this was fixed in latest DEV already.

🇸🇪Sweden peter törnstrand

Released in version 1.0.6.

🇸🇪Sweden peter törnstrand

Moving this to 2.x which will drop support for core < 11

🇸🇪Sweden peter törnstrand

Check latest DEV. I added a settings to display the weight if the user wants it. It's turned off by default.

🇸🇪Sweden peter törnstrand

Well, I guess it removed it because it is a terrible UI experience. I could perhaps make it a settings to display the weight. But then we would also need to print the weights of the existing items so you know what weight to set.

🇸🇪Sweden peter törnstrand

And also, have a look at the Drush command monitoring:run. It can output results in different formats. See code https://git.drupalcode.org/project/monitoring/-/blob/8.x-1.x/src/Command...

Production build 0.71.5 2024