Closed (fixed)
Project:
Node title help text
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2017 at 13:25 UTC
Updated:
1 Sep 2017 at 09:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gremy commentedHere is a patch to convert usage of Drupal::state to config.
Comment #3
gremy commentedComment #4
hawkeye.twolfLooks great! Thanks Gremy.
Comment #5
jadhavdevendra commentedI get this error after applying the patch.
Recoverable fatal error: Object of class Drupal\Core\Field\EntityReferenceFieldItemList could not be converted to string in node_title_help_text_form_node_form_alter() (line 21 of modules/node_title_help_text/node_title_help_text.moduleComment #6
hawkeye.twolfYup, same here, thanks for the report @jadhavdevendra. I think @gremy is working on addressing it.
Comment #7
rolodmonkey commentedJust a note, it looks like this patch would simply abandon the existing settings and leave them in the DB.
Since the D8 version of this module doesn't have a stable release, that is technically allowed. But, I wonder how hard it would be to provide an update hook that migrates the settings?
Comment #8
gremy commentedSorry. I updated the code and now it's way better.
There were more problems with configuration not boing imported.
After more research the recommended method is to use "getThirdPartySetting" and "setThirdPartySetting".
Here is an updated version using ThirdPartySettingsInterface.
Comment #9
gremy commented@RoloDMonkey as you said, since this is a DEV version, and there is no stable, alpha or beta release for D8 an update hook is not required.
Comment #10
gremy commentedTo prevent loss of configuration for sites that had the States config version I made added an update hook.
I also updated hook_uninstall.
Comment #11
hawkeye.twolfWorks like a charm! Uploading a new version that fixes Coder issues in the patch, and marking RTBC.
Comment #12
jadhavdevendra commentedI am getting following error while saving the help text for default article content type.
Recoverable fatal error: Argument 2 passed to node_title_help_text_form_node_type_form_builder() must be an instance of NodeTypeInterface, instance of Drupal\node\Entity\NodeType given in node_title_help_text_form_node_type_form_builder() (line 59 of modules/node_title_help_text/node_title_help_text.module).Comment #13
hawkeye.twolfAh, hmmm. @jadhavdevendra, what version of Drupal 8 are you running? I tested on 8.3.5.
Comment #14
jadhavdevendra commentedMe too using 8.3.5. I have sent you a message with access details to test environment.
Comment #15
hawkeye.twolf@jadhavdevendra, yowsers! Thanks for the link and creds to your environment, I see the error you're talking about. Investigating further...
Comment #16
hawkeye.twolfFound it :) A missing
usestatement at the top. See attachedinterdiff.txt. That was my bad for not doing proper QA. I didn't actually try saving the form, I just saw that the settings provided by @gremy deployed correctly in our project environment. I'm guessing he must have set the config value programmatically / manually, 'cause the form save couldn't have worked for him either.Anywho, please give it another go @jadhavdevendra and let us know. Thanks! :)
Comment #17
hawkeye.twolfComment #18
sinn commented#16 works good
Comment #19
hawkeye.twolfComment #21
jadhavdevendra commentedFixed and created 8.x-1.0 release.