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
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | AdvancedHelp-PageError-fixed.png | 141.74 KB | clarkssquared |
| #13 | AdvancedHelp-error-fixed.png | 229.77 KB | clarkssquared |
| #13 | AdvancedHelp-installed.png | 95.1 KB | clarkssquared |
| #13 | AdvancedHelp-dependencies.png | 183.72 KB | clarkssquared |
| #9 | 3347347-after-patch-terminal.png | 84.83 KB | clarkssquared |
Comments
Comment #2
gturnbull commentedComment #3
gturnbull commentedComment #4
gisleThank 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.
Comment #5
gturnbull commentedComment #6
gturnbull commentedComment #7
gturnbull commentedComment #8
gturnbull commentedComment #9
clarkssquared commentedHi 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.
Comment #10
gturnbull commentedHi 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
Comment #11
gturnbull commentedHi clarkssquared,
Here are some steps to help with testing:
Comment #12
gturnbull commentedComment #13
clarkssquared commentedHi 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.
Comment #14
gturnbull commentedHi clarkssquared,
Thank you for testing my patch! Your time and effort is greatly appreciated.
Best regards,
Gordon
Comment #16
gisleThis is fixed in the latest snapshot of the 8.x-1.x-dev branch.