Venezia
Account created on 12 September 2007, over 17 years ago
#

Merge Requests

More

Recent comments

🇮🇹Italy plach Venezia

I had a look at the MR and did some testing and this looks good to me as well, thanks!

🇮🇹Italy plach Venezia

@lauriii

However, many of these sites are re-using media and it would be great if we could solve this in a way that doesn't get rid of the re-use media part. I think there are ways in which this could be solve so that we would have both.

In terms of what is possible right now, the widgets defined by Media Widgets were thought explicitly with non-reusability in mind: they mimic the Media Library widgets without offering the ability to select existing media. A site needing to support use cases could certainly enable both the Media Library widget on re-usable media reference fields (e.g. an article content type only authored by the site's editorial team) and the non-reusable Media Widgets for other use cases, e.g. user pictures.

An approach I've been thinking about, but that I didn't have the opportunity to explore is conditionally enabling the existing media selector depending on permissions: a less privileged user could only upload new media items (or enter new URLs), while a more privileged one could have access to the Media Library as well. From the implementation perspective, this would likely mean always using the Media Library widget and tweak its logic to make access to the existing media selection UI conditional.

🇮🇹Italy plach Venezia

While 📌 OOP hooks using event dispatcher Needs review is a huge improvement (and one I'm deeply grateful for :), I think it's undeniable that having both Symfony Events and Drupal Hooks at the same time means having two competing implementations of the observer pattern. In most cases there is not a clear reason to pick one or the other, if not a matter of "taste". In an ideal world we'd have a single system covering all use cases and core would promote consistency in contrib by only using that. In an ideal world both Symfony and Drupal would use that same system :)

🇮🇹Italy plach Venezia

(Wrong issue, sorry for the noise :)

🇮🇹Italy plach Venezia

Looks good and works well, thanks!

🇮🇹Italy plach Venezia

Looks good to me but we need tests: converting #31 would be a good start :)

🇮🇹Italy plach Venezia

@amateescu's review was addressed and this works fine here. I think we're good to go.

🇮🇹Italy plach Venezia

This was not working as intended: I got errors when testing this with legacy redirects containing absolute URLs. The attached PR just turns the redirect into a relative URL.

🇮🇹Italy plach Venezia

This is looking good and working well, but I'd perform a small tweak.

🇮🇹Italy plach Venezia

Rerolled the patch on the current HEAD. Raising priority to major since the performance gain may be significant.

🇮🇹Italy plach Venezia

plach made their first commit to this issue’s fork.

🇮🇹Italy plach Venezia

That's what we are changing here, so far 5.0.x is just a copy of 4.2.x.

🇮🇹Italy plach Venezia

Sorry for the belated feedback :)

We have plenty of versions supporting all sorts of combinations of legacy versions of Drush and Drupal. I think for Drupal 11 it makes sense to drop support for the older stuff.

🇮🇹Italy plach Venezia

The solution to restore the primary key and default to 0 for the int ID makes sense to me: users are not supported and even if they were, the anonymous user wouldn't be editable. Any content entity out there with numeric ID relying on core base classes will start from 1, so I think this is a safe approach.

The MR code has been working nicely in production for a while now, except for the latest update, and tests look good, so I think we are done here.

🇮🇹Italy plach Venezia

4.2.x targets all versions of Drush >= 11

🇮🇹Italy plach Venezia

If you are using PHPStorm, please upvote the related issue. This should increase the likelihood we get a fix in timely fashion.

🇮🇹Italy plach Venezia

I pushed a commit to take removed entity types into account, as I got the following error when trying to run the latest wse updates:

>  [notice] Update started: wse_menu_update_10002
>  [error]  The "wse_menu_tree" entity type does not exist. 
>  [error]  Update failed: wse_menu_update_10002 
🇮🇹Italy plach Venezia

Just for posterity reference: I asked @amateescu why we are not just converting the target_entity_id field type from int to string. The reason is that Postgres can't do joins on columns with different types.

🇮🇹Italy plach Venezia

Thanks for the offer: the 4.x version of the module was developed as part of the launch of a D9 website, which is actively using it, however at the moment there is no additional development foreseen. I'm open to grant co-maintainership to other people, my main concern is that the functionality that was built so far keeps working as originally designed, so that our project is not negatively impacted.

🇮🇹Italy plach Venezia

Given how common the image/media use case is, compare to text only, I think we could even have an media entity reference defined in code as a base field.

🇮🇹Italy plach Venezia

I agree this would be desirable, contributions welcome :)

🇮🇹Italy plach Venezia

Looks good and works well, thanks!

+++ b/modules/wse_preview/src/WsePreviewWorkspaceManager.php
@@ -0,0 +1,138 @@
+  public function __construct(WorkspaceManagerInterface $inner, CookieWorkspaceNegotiator $cookie_workspace_negotiator, RequestStack $request_stack) {

Nit: we can rely on constructor property promotion here :)

🇮🇹Italy plach Venezia

Committed and pushed to 4.2.x, thanks!

🇮🇹Italy plach Venezia
+++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
@@ -281,6 +281,16 @@ protected function load() {
       return FALSE;
...
+      $this->logger->error("The image toolkit '@toolkit' failed loading image '@image'. Failed function: @function.", [
+        '@toolkit' => $this->getPluginId(),
+        '@image' => $this->getSource(),
+        '@function' => $function,
+      ]);
+      $this->preLoadInfo = NULL;
+      return FALSE;

Instead of duplicating this logic, why don't we just set $image to FALSE in the catch branch?

🇮🇹Italy plach Venezia

@sathishkumar

Thanks for the patches, but the changes will be merged to the development branch first, then backported.

🇮🇹Italy plach Venezia

plach made their first commit to this issue’s fork.

🇮🇹Italy plach Venezia

Looks good and works well here, I pushed a small commit to address @graber's review.

I only changed a word in a comment, so I think it's fine for me to RTBC this :)

🇮🇹Italy plach Venezia

I had a look and I'm not sure that providing a ResourceTranslationTestBase class extending ResourceTestBase is the way to go: we would need to duplicate the children classes (e.g. EntityTestTest), reimplementing the abstract methods twice with the same logic.

I'd rather provide a test trait that could be used by both JsonApiTranslationFunctionalTest and any resource-specific test class, e.g. EntityTestTranslationTest extending EntityTestTest. We could then extend TestCoverageTest to check for the translation test classes presence and ensure all resources also provide translation-test coverage.

🇮🇹Italy plach Venezia

@Wim Leers

Thanks for the review and sorry for the belated reply!
(I'd need more birthdays to work on this regularly ;)

For now, I'm especially interested in understanding why this is not extending ResourceTestBase but JsonApiFunctionalTestBase.

I think (it's been a while for me as well), I was just hoping that as an experimental module we could get away with only generic test coverage, as providing test coverage for every entity type seemed overkill at the time, as we did not discuss any entity-type specific logic. OTOH since the scaffolding is already there now, I assume it should not be a huge amount of work to try and leverage ResourceTestBase instead. I'll give it a try, stay tuned :)

🇮🇹Italy plach Venezia

Hey, so the D9+ branch is a complete rewrite and is very limited in scope: basically only the features that were needed by the organization who sponsored the work were ported, so no scheduling is implemented at the moment. For the same reason, permissions are not very granular: anyone with the Administer ADs permission can create/edit any AD.

🇮🇹Italy plach Venezia

plach changed the visibility of the branch 3199697-add-jsonapi-translation to hidden.

🇮🇹Italy plach Venezia

Ok, this should be ready for reviews for reals now :)

🇮🇹Italy plach Venezia

Looks good to me and works well here, thanks!

🇮🇹Italy plach Venezia

Bug fixes need to be applied to the dev branch first and then backported :)

🇮🇹Italy plach Venezia

Looks good to me, I'll manually test this for a while and then report back.

🇮🇹Italy plach Venezia

@Graber

Could you please add some details to the IS Problems/Motivations section?

🇮🇹Italy plach Venezia

@Berdir

Note that the other issue also tried to handle skipped deprecations, which is IMHO crucial for this, as some of them have been logged a _lot_ historically and would completely spam that log, making it rather useless.

Fair, what about making those configurable via a setting as well? We could hardcode a default if the setting is NULL.

🇮🇹Italy plach Venezia

What about using PHP settings to make the behavior configurable? We could make this opt-in by assuming a FALSE default and punt aggregation/filtering to a follow-up issue :)

🇮🇹Italy plach Venezia

Sorry, but this module is not meant to help during upgrades for the reasons explained at https://www.drupal.org/project/devel_entity_updates/issues/3082442 .

🇮🇹Italy plach Venezia

I realized I didn't properly implement @UsingSession's suggestion. I did it now, hopefully :)

🇮🇹Italy plach Venezia

The changes in the MR make things way cleaner, but they seem out of scope for this issue. I'm attaching a patch with the only change that I think is required to get rid of the warning. It would be good to create a separate issue to clean up service injection.

🇮🇹Italy plach Venezia

@mahyarsbt

Could you please publish your code as a sandbox, so we can evaluate your request properly?

🇮🇹Italy plach Venezia

@gabesullice

Addressed your reviews at https://www.drupal.org/project/drupal/issues/3199697#mr1591-note220760 📌 Add JSON:API Translation experimental module Needs work

🇮🇹Italy plach Venezia

The commit above adds GET test coverage, the rest is still to do.

🇮🇹Italy plach Venezia

@bbrala @bradjones1

I resumed work on this today at the DrupalCon Lille sprint. Regarding #143 - #144, the latest code uses a langCode parameter. That looks compliant, doesn't it?

🇮🇹Italy plach Venezia

I'll try to push this forward a bit :)

🇮🇹Italy plach Venezia

Looks good and works well, thanks!

🇮🇹Italy plach Venezia

Only a minor nit, looks good and works well, otherwise :)

+++ b/fivestar.tokens.inc
@@ -0,0 +1,72 @@
+    !\array_key_exists('fivestar-rating', $tokens) &&
+    !\array_key_exists('fivestar-count', $tokens)

The leading slash is redundant :)

!array_key_exists(

🇮🇹Italy plach Venezia

@pobster

Shouldn't this be committed to the 5.x branch as well?

🇮🇹Italy plach Venezia

This is a reroll (+ typehint cleanup) of #3, which is working for our use cases (webp conversion).

Production build 0.71.5 2024