Problem/Motivation

If the Advanced Help module is installed on a site and the Help module provided by Drupal core is not enabled, the following warning message is logged to the Drupal event log each time a page is loaded: getDerivativeDefinitions() does not return an array for plugin "advanced_help.local_tasks".

The getDerivativeDefinitions() function is located on line 15 of the /html/modules/contrib/advanced_help/src/Plugin/Derivative/DynamicLocalTasks.php file.

Steps to reproduce

1. Ensure the Help module provided by Drupal core is disabled. If not, disable it.
2. Enable the Advanced Help module.
3. Clear the cache.
4. Load any page.
5. Check the Drupal event log.
6. See the following warning message: getDerivativeDefinitions() does not return an array for plugin "advanced_help.local_tasks".

Proposed resolution

Add the Help module provided by Drupal core as a dependency of the Advanced Help contributed module.

Remaining tasks

Done - Create a patch that adds the dependency to the advanced_help.info.yml file.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

gturnbull created an issue. See original summary.

gturnbull’s picture

gturnbull’s picture

Issue summary: View changes
Status: Active » Needs review
gisle’s picture

Assigned: gturnbull » Unassigned

Thank you for the patch!

It look straightforward, but I still need some more eyeballs on this. Unassigning to open up for others to review it.

gturnbull’s picture

Issue summary: View changes
gturnbull’s picture

Issue summary: View changes
gturnbull’s picture

Issue summary: View changes
gturnbull’s picture

Issue summary: View changes
clarkssquared’s picture

Status: Needs review » Needs work
StatusFileSize
new527.91 KB
new456.49 KB
new84.83 KB

Hi gturnbull,

I applied patch #2 to the "Advanced Help" module against Version 8.x-1.x-dev, and noticed that the issue was not resolved, and when I clear cache in my terminal I can also see the error/warning.

Please see the screenshots attached.

For your review.
Thank you.

gturnbull’s picture

Hi clarkssquared,
Thank you for taking the time to test my patch.

After applying the patch, the advanced_help module will have a new project dependency, the Help module provided by Drupal core.

If you then install the help module provided by Drupal core, the error/warning should no longer appear in the Drupal event log when you load pages on your site.

Hope this helps.

Thank you,
Gordon

gturnbull’s picture

Hi clarkssquared,
Here are some steps to help with testing:

  1. Ensure the Help module provided by Drupal core is uninstalled.
  2. Ensure the Advanced Help module is installed.
  3. Apply the patch from comment #2.
  4. Uninstall the Advanced Help module.
  5. Re-install the Advanced Help module. This time, the Help module provided by Drupal core will be listed as a project dependency, so you will be required to install the Help module while installing the Advanced Help module.
  6. Load any page on your site.
  7. Check the Drupal event log. You should no longer see the error/warning when pages are loaded.
gturnbull’s picture

Status: Needs work » Needs review
clarkssquared’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new183.72 KB
new95.1 KB
new229.77 KB
new141.74 KB

Hi gturnbull,

Thank you for providing the steps which are indeed helpful, I followed through with your steps as I retested the issue and I load a page in my site and clear cached and confirmed that the issue was resolved.

Please see the screenshots attached for your reference

For your review.
Thank you.

gturnbull’s picture

Hi clarkssquared,
Thank you for testing my patch! Your time and effort is greatly appreciated.

Best regards,
Gordon

  • gturnbull authored 0c368f84 on 8.x-1.x
    Issue #3347347 by gturnbull, clarkssquared, gisle: Fixed missing...
gisle’s picture

Status: Reviewed & tested by the community » Fixed

This is fixed in the latest snapshot of the 8.x-1.x-dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.