🇫🇷France @estoclet

Account created on 25 March 2015, almost 10 years ago
#

Recent comments

🇫🇷France estoclet

Changes :

  • Added validation in BookModerationHooks::loadBookChildren() to check if the node is registered in the book structure.
  • Added assertions in BookModerationSyncTest::testModerationStateSync() to verify book and chapter registration.
  • Improved error logging for better debugging.
🇫🇷France estoclet

Subject: Issue Resolved in Latest Version

Hello [User's Name],

Thank you for reporting this issue. We have investigated the problem and are happy to inform you that it has been resolved in the latest version of the Book Moderation Sync module.

Details of the Fix

The error you encountered was due to a type mismatch in the book_moderation_sync_help function. Specifically:

  • The function expected an argument of type RouteMatchInterface.
  • However, an object of type Drupal\Core\Routing\CurrentRouteMatch was being passed, causing a TypeError.

In the latest version of the module, this issue has been fixed by ensuring that the book_moderation_sync_help function is correctly typed and compatible with CurrentRouteMatch. Here is the relevant part of the updated code:

function book_moderation_sync_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.book_moderation_sync':
      return '<p>' . t('Synchronizes moderation states between books and their children.') . '</p>';
  }
}

Next Steps

  1. Update the Module:
    • If you haven't already, please update to the latest version of the Book Moderation Sync module (1.0.0-beta6 or later).
    • You can download the latest release from the project page .
  2. Clear Cache:
    • After updating the module, clear the Drupal cache to ensure that the changes take effect. You can do this by navigating to Administration > Configuration > Performance and clicking "Clear all caches."
  3. Verify the Fix:
    • Test the module's functionality, especially the help page (/admin/help/book_moderation_sync), to confirm that the issue no longer occurs.

If the Issue Persists

If you continue to experience issues after updating the module, please:

  • Provide detailed steps to reproduce the problem.
  • Share any error messages or logs you encounter.
  • Confirm the versions of Drupal core and the module you are using.

We appreciate your feedback and are here to help if you encounter any further problems.

Best regards,

🇫🇷France estoclet

Proposed resolution:
Add a check for the "pid" key in the methods `getBookParents` and `updateOriginalParent` of the BookManager class to prevent undefined array key warnings.

Production build 0.71.5 2024