- Issue created by @ammaletu
- Assigned to lobsterr
- @lobsterr opened merge request.
- Status changed to Needs review
almost 2 years ago 4:47pm 6 February 2023 - 🇧🇪Belgium lobsterr
@Ammaletu - It was fixed. I also improved a messages and reverted log message. Please check it and I will tag a new version
- Status changed to Needs work
almost 2 years ago 6:02pm 10 February 2023 - 🇩🇪Germany ammaletu Bonn, Germany
I tested your changes. Reverting the permission revision works now. There is something strange about the message which is set, though. I got `Copy of the revision Test 1 from 46.`. The last part is supposed to be the date, but only shows the minute of the original revision which was reverted (saved at 18:46). I tried with different revisions and always got the minute from the original timestamp.
- 🇧🇪Belgium lobsterr
I have done some improvements, but I can't reproduce your issues. In the clean Drupal installation I get such message:
my revision (Sat, 02/11/2023 - 01:36) has been reverted to the revision from new revision (Sat, 02/11/2023 - 01:35).
I am not using specific date format here, it comes from the system configuration:
$this->dateFormatter->format($current_revision->getRevisionCreationTime())
I assume probably for your Drupal installation you have date format, which displays only time.
Could you please check it ?
- 🇩🇪Germany ammaletu Bonn, Germany
I checked this again and debugged it a bit. The date formatter correctly outputs `Di., 14.02.2023 - 18:49` for the current timestamp. When I use this as input for the t function's placeholder `:date`, only the 49 is in the output. Everything works as expected when using `@date` as placeholder.
The documentation for the t function placeholders list the different approaches:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Rend...It states for : placeholders: "Return value is escaped with \Drupal\Component\Utility\Html::escape() and filtered for dangerous protocols using UrlHelper::stripDangerousProtocols()." The latter function interpretes everything before the minute as a protocol, and since it is unknown it is stripped out. I think in this case using @ for the placeholders is the better approach.
-
LOBsTerr →
committed 32b36aee on 1.0.x
Issue #3338926 by LOBsTerr: Error when trying to revert a group...
-
LOBsTerr →
committed 32b36aee on 1.0.x
- Status changed to Fixed
almost 2 years ago 10:35pm 14 February 2023 - 🇧🇪Belgium lobsterr
Nice catch. I strange that I wasn't able to reproduce it. Anyway, I want to thank you for your contribution and your time.
- 🇩🇪Germany ammaletu Bonn, Germany
No problem. The company I work at is using Drupal for our product, so giving back to the community a bit feels good. Thanks for creating the new release!
Automatically closed - issue fixed for 2 weeks with no activity.