- Issue created by @Anybody
- 🇫🇷France Grimreaper France 🇫🇷
Hi,
Thanks for your feedbacks.
As it is in a template, I would have guessed people would override the template to remove it if needed.
Ok to remove it, if:
- there is an update hook
- let's put "hint:" as default value when configuring the formatter? - 🇩🇪Germany Anybody Porta Westfalica
As it is in a template, I would have guessed people would override the template to remove it if needed.
Right, as written above I just think it's unnecessarily hard for site owners / managers and has no real benefit. You could simply add the word, if needed, but can't remove it without code currently.
- there is an update hook
Sure!
- let's put "hint:" as default value when configuring the formatter?
You decide! We can do that, but I'd vote to only do that for existing sites in the update hook and leave it empty. The labels / description should do the job and if it's not enough we could use a
#prefix
. I don't really see a good reason for that word, but that's just my personal opinion. Please think about it and let me know about your final decision :)We'll finish this afterwards.
- 🇫🇷France Grimreaper France 🇫🇷
I think this word is a legacy from Protected Node but not sure.
Ok for existing websites, and empty for new installs.
- Status changed to Needs work
15 days ago 2:16pm 5 May 2025 - 🇩🇪Germany Grevil
Should we write the update hook for nodes only? Or should we use other core entities as well (media, taxonomy_term)? As this module works for any filedable entity.
Since I don't think, we can simply load all fieldable entities who use the "entity_access_password_password" field type.
- 🇩🇪Germany Grevil
Current MR now holds the version for updating node only. Note, that this update hook isn't tested yet.
Need further feedback.
- Merge request !17Issue #3501095 by anybody, grimreaper: Remove static "Hint:" prefix - easy to add, hard to remove for site owners → (Open) created by Grevil
- 🇩🇪Germany Anybody Porta Westfalica
@grevil thanks, that looks exactly as planned. Regrading the entity question: I thinkt here must be a way to get all entity types / bundles that use a certain field type, here:
entity_access_password_password
Those should then be processed, I think. Do you agree?
- 🇩🇪Germany Grevil
Yea I agree, this should be it now. I still need to test it though.
I am wondering if we need to leverage the batch api here... on large sites this could very well reach the memory limit...
- 🇩🇪Germany Grevil
Alright, this works great! Just tested it through adding two differently named password fields on a node bundle and taxonomy bundle and created 1 new entity per bundle.
The string "Hint: " was prepended as expected on both. Ready for review!
- 🇩🇪Germany Anybody Porta Westfalica
Whao this is crazy good @grevil! Thank you! LGTM, let's wait for @grimreaper's feedback!
- 🇩🇪Germany Grevil
Thanks! So summarizing this, there are two questions left:
- Should we leverage the batch API?
- Should we preserve the "changed" date?
Let's wait for @grimreaper's feedback!