Account created on 21 February 2010, almost 15 years ago
#

Merge Requests

More

Recent comments

🇷🇴Romania amateescu

I saw that in the issue summary so I checked before doing it, and \Drupal\Core\Datetime\DateFormatter is very much translation-aware, most of its methods call formatPlural() at some point, so I think we're good.

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

Another thing to check is whether 🐛 Users without permission still see action links Active changed something for you.

🇷🇴Romania amateescu

Then I need more info on the exact steps to reproduce, trash version, etc. because I tried the steps in the issue summary and I get a 403 when accessing node/X/delete?in_trash=1 or <code>node/X/delete?in_trash for a deleted node.

🇷🇴Romania amateescu

Implemented a fix for this, thanks for the bug report :)

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

Committed a small fix because translation strings cannot be concatenated with variables, then looked into displaying the actual period of time until a trashed item can be restored, and it turned out quite easy to do :)

🇷🇴Romania amateescu

I think you have a module that clashes with Trash's node's access control handler override. Can you check that, for example using this code: get_class(\Drupal::entityTypeManager()->getAccessControlHandler('node'));?

🇷🇴Romania amateescu

Thanks for the bug report :) Can you try the MR attached?

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

I also think it's fine to remove it, Navigation is still marked experimental.

🇷🇴Romania amateescu

@steffenr, note that the MR that was merged did not create a submodule, it fixed everything in the main module :)

🇷🇴Romania amateescu

I was also surprised to see them, even hardcoded before I changed that in Integrate with Workspaces Active , but didn't really look into why...

Posted a comment on the MR.

🇷🇴Romania amateescu

Merged MR !47 into 3.x, thanks for reporting and working on this!

🇷🇴Romania amateescu

I can't reproduce this problem. How are you deleting the nodes in step 2?

🇷🇴Romania amateescu

The original problem from the current issue summary was fixed in 🐛 Revert and Delete actions should not be available for the current revision Fixed , but that issue introduced a new problem: when you have pending revisions (e.g. make changes in a workspace), you can not revert to the default revision, while you can revert the latest (workspace) revision. This doesn't make sense and it was actually one of the goals of the issue mentioned above, but somehow missed in the implementation.

The current MR is fixing the new problem in the entity API, so I'm going to repurpose this issue since it's not workspace-specific anymore.

🇷🇴Romania amateescu

Found the cause of those test failures, and implemented a quick workaround until 📌 Hook ordering across OOP, procedural and with extra types Active is done.

🇷🇴Romania amateescu

A quick followup is needed here: 🐛 The active variant of an entity in the Live workspace should be the default revision Active

I forgot we need to apply the same principle of this issue for latest revision / EntityRepository::getActive() in Live.

🇷🇴Romania amateescu

+1 for the RTBC. I added this in 🐛 Improve performance for path_alias queries in a workspace Active thinking that path aliases are translatable, but they're not :)

🇷🇴Romania amateescu

Looked a bit into this and the problem with VBO is that its altering views queries twice, see https://git.drupalcode.org/project/views_bulk_operations/-/blob/4.3.x/sr...

Implemented a simple fix for that, and added support for its confirmation form inside the existing form alter.

@steffenr, can you check the new MR and see if it covers everything properly?

🇷🇴Romania amateescu

I think this should be part of the main module, can't see why it would require a sub-module to be enabled. As for putting requirements in the main composer.json file just for Gitlab CI, a "soft" dependency can be put into the require-dev section :)

💬 | IP Login | Thanks!
🇷🇴Romania amateescu

This was a really nice email to start the week, thank you! :D

Allow multiple ip ranges per user Needs work was the most important issue to get done before a stable release, and I'd like to take a look at #3251359: Move static methods of IpLoginController to a service and #3308415: Allow for a configurable login path as well.

🇷🇴Romania amateescu

There's also https://www.drupal.org/project/restrict_login_ip now, and I agree with @davidwhthomas that it's not really in the scope of this module.

🐛 | IP Login | PHP 5.5
🇷🇴Romania amateescu

Closing old issues.

🇷🇴Romania amateescu

A D8+ version is available since 4.0.0-alpha1

🇷🇴Romania amateescu

Closing old issues :)

🇷🇴Romania amateescu

Merged into 2.0.x and cherry-picked to 1.0.x, thanks for all the work here!

🇷🇴Romania amateescu

After giving this a lot of thought and trying various things, decided to go in a different direction than the latest MRs:

- stop filtering revisions -> all revisions are visible on the overview page regardless whether you're in a workspace or not
- add a Workspace table column (at the end)
- prevent revert and delete revision operations when an entity is tracked in a workspace and you're viewing the revision overview page from Live or a different workspace

🇷🇴Romania amateescu

amateescu changed the visibility of the branch 3490853-live-revisions-in-ws to hidden.

🇷🇴Romania amateescu

amateescu changed the visibility of the branch 3490853-live-revisions-in-ws_2.0.0-alpha6 to hidden.

🇷🇴Romania amateescu

You need to run the database updates. Add support for only enabling on certain bundles Fixed changed the config structure for supported entity types, and provided an update function for it.

🇷🇴Romania amateescu

Updated both the 11.x and 11.1.x MRs to expand that comment, and added explicit test coverage.

🇷🇴Romania amateescu

Another option would be to load _all_ route aliases in the route match service, then in getRouteName() trigger the deprecation if the passed-in route name is an alias (and deprecated).

🇷🇴Romania amateescu

Replied to the MR comment. It seems that the number of MRs here causes some confusion, so here's a quick breakdown for them:

11.x -> MR !6681
11.1.x -> MR !10971
10.5.x (and below) -> MR !10973

And to reply to that comment here as well, note that in the 11.x MR the hook implementation is in the proper place: core/modules/workspaces/src/Hook/EntityOperations.php

OOP hooks made it very "fun" to work on the Worskspaces module :)

🇷🇴Romania amateescu

I've searched contrib usage for the node.add and node.add_page routes, and it seems they're quite popular. Should we keep them around until Drupal 13 to give folks more time to update?

🇷🇴Romania amateescu

Removed those ignored deprecations and all the usages of the deprecated route names. Also updated the CR to mention route match checks :)

🇷🇴Romania amateescu

Updated the MR to use the new route deprecation mechanism.

🇷🇴Romania amateescu

📌 [PP-1] NodeRouteProvider should extend DefaultHtmlRouteProvider Needs work is now using core's new mechanism for deprecating routes ( 📌 Support route aliasing (Symfony 5.4) and allow deprecating the route name Needs work ), so I don't think we need an issue specifically for removing that deprecation.

🇷🇴Romania amateescu

@catch, there's no need to do any additional filtering in RouteProvider::getRoutesByPath() because we only store data in the name, route and alias columns, so the current conditions on pattern_outline or number_parts already exclude aliases.

Another place would be ::preLoadRoutes(), but that's called by ::getRoutesByNames() (which in turn is used by ::getRouteByName() and the new ::getRouteAliases()), so no need to filter there.

And then there's ::getAllRoutes() which is documented to return an array of Route objects and has this doxygen:

   * Usage of this method is discouraged for performance reasons. If possible,
   * use RouteProviderInterface::getRoutesByNames() or
   * RouteProviderInterface::getRoutesByPattern() instead.

Added a filter in ::getAllRoutes() and moving back to RTBC because I don't think this change requires test coverage.

🇷🇴Romania amateescu

This was recently fixed in core: 🐛 User login and password reset forms should be workspace-safe Active

Are you on a Drupal version which contains that change?

🇷🇴Romania amateescu

The bot is confused when there are multiple MRs. 6681 (3045177-workspace-specific-latest-revision) is the one for 11.x. Updated the IS.

🇷🇴Romania amateescu

amateescu changed the visibility of the branch 3471675-improve-form-validation to active.

🇷🇴Romania amateescu

amateescu changed the visibility of the branch 3471675-improve-form-validation to hidden.

🇷🇴Romania amateescu

While working on 📌 Allow for / implement simplified content workflow with workspaces Active , it turned out that this is very much needed for that issue, and for Ability to edit content in live workspace when it has been edited in other workspaces Active as well.

Pushed an update to also handle latest translation affected revisions.

🇷🇴Romania amateescu

This could've been done in a new issue, but merged it here for expedience :) Thanks!

🇷🇴Romania amateescu

There's no mention in #11 about testing with Layout Builder and Workspaces, so I tested everything myself.

Found and fixed one problem: when an entity using Layout Builder was purged, its inline blocks were only soft-deleted, basically leaving them around forever.

🇷🇴Romania amateescu

Did we consider doing this all in one expanding menu, and doing away with the confirm dialog?

Yup, that's the long-term plan per #30 :) While this issue is only focused on exposing Workspace's current switcher (with all its problems), in a followup we'll handle both suggestions. There's a screenshot in this comment #3457688-29: Support for core navigation experimental module which shows the WIP design for the full Workspaces navigation UI.

🇷🇴Romania amateescu

Merged the second one as well :)

🇷🇴Romania amateescu

Merged into 8.x-1.x, thanks!

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

@andypost, thanks for fixing the pgsql issue, I was really scratching my head around it. Reverted your latest commit, we can't add them at the same time until the issue you just opened is fixed, and it's also not worth waiting for it :)

🇷🇴Romania amateescu

Updated the MR to use the new content_top region from Allow other modules to include their own Navigation blocks during installation Active . Another artificial dependency down...

🇷🇴Romania amateescu

I have one idea that we can try, but it will complicate things a bit and it depends on content_moderation specifically.

If this idea works and it's not super hard to implement, I think it would be worth doing. It would be temporary anyway, until 📌 Allow for / implement simplified content workflow with workspaces Active is finished and Content Moderation will be able to properly track an entity and its dependencies.

🇷🇴Romania amateescu

we wouldn't even need to ask whether to re-parent the restored children once their parent gets restored, since they'd be restored alongside of it.

There's a tricky edge case here brought up by @Fabianx: what if a child term was trashed before its parent. In that case it shouldn't be automatically restored alongside the other children of that parent term. I've been thinking about this problem for quite a while, and I think it could be accomplished by ensuring that we only restore child terms with the deleted timestamp >= than the one of the parent term.

🇷🇴Romania amateescu

Merged into 2.0.x and cherry-picked to 1.0.x, thanks!

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

Opened a MR to fix this. It doesn't need any new test coverage, this behavior is already tested in a lot of places.

🇷🇴Romania amateescu

Merged into 2.0.x and cherry-picked to 1.0.x, thanks!

🇷🇴Romania amateescu

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

🇷🇴Romania amateescu

I think it's too late to backport this to 10.4.x now, and the regression pointed out above should get into 11.1.x since it's only a bugfix.

🇷🇴Romania amateescu

I looked into it and the test failure is genuine, \Drupal\workspaces\Hook\EntityOperations::entityPresaveLast() runs before \Drupal\content_moderation\Hook\ContentModerationHooks::entityPresave().

What I found is that ModuleHandler::invokeAllWith() executes the callbacks in a foreach keyed by module name, and ModuleHandler::invokeMap['entity_presave'] looks like the screenshot attached.

🇷🇴Romania amateescu

Or perhaps it could be even simpler (at least in terms of UI, though not sure how tricky in terms of implementation) if there was a link to switch the site to a closed (previously published) workspace, same as how you can view a site in an open (not yet published) workspace?

We've been discussing this feature for a while, and in order to have a true representation of a past state of the site, there are two major problems to tackle in terms of implementation:

  • deleted content: e.g. if a node is deleted after that workspace was published, we have no way of bringing it back unless the Trash module is also used, in which case this would be solved because the past revisions are still in the database.
  • new content: e.g. if a new node is added after that workspace was published, we don't have a way of knowing that it should be excluded from being displayed, for example in views listings

Those problems also extend to entity types that are either ignored (e.g. files) or not supported by workspaces (not revisionable/publishable).

The latest "running thought" for this was to store the entire state of the site for workspace-supported entity types (i.e. a list of all entity IDs => revision IDs at the time of workspace publication), use that list to create a temporary workspace on-demand, and change the way of swapping default revisions to use an INNER join rather a LEFT join on the workspace association, which would ensure that only the entities that were "live" at that time will be queried/loaded/displayed/etc. This approach is a bit problematic in terms of database size though, which could grow _a lot_ for sites with a large amount of content, and it also doesn't handle ignored/unsupported entity types.

I think CPS in D7 does something similar, but it stores the list of entities in files on disk, which alleviates at least the database size issue.

🇷🇴Romania amateescu

The current code from HMIA doesn't run the implementation twice, it moves it first then moves CM's implementation before it. I'll look at the test failure tomorrow :)

🇷🇴Romania amateescu

Pushed a commit to fix Workspaces' presave implementation, we don't want to run the whole thing twice :)

🇷🇴Romania amateescu

Or , depending , one hook implementation which runs first and one that runs last -- we now have the ability to implement the same hook twice. Yay.

Yup, that's what we need for Workspaces, to split the current implementation in two separate methods.

🇷🇴Romania amateescu

workspaces is a fun one: It moves itself first *but* also moves content_moderation "firster". How would that look with the new system?

Workspaces needs the ability to implement the entity presave hook twice, one that runs first and one that runs last :) The current code that moves CM's implementation before is just a workaround.

🇷🇴Romania amateescu

I wouldn't mind changing wse_scheduler to use Scheduler's API/UI, or deprecating it entirely in favor of a Scheduler sub-module. The current code was a quick solution that "just worked", but I definitely agree that the UX is a bit.. lacking :)

Production build 0.71.5 2024