Closed (fixed)
Project:
Emoji Scrub
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Jul 2015 at 16:31 UTC
Updated:
28 Jul 2015 at 21:44 UTC
Jump to comment: Most recent, Most recent file
Hi.
Thank you for this module.
I have noticed that you have used hook_node_presave() and hook_taxonomy_term_presave(). But it will be better to use hook_entity_presave() instead. With hook_entity_presave() it will be possible to preprocess comments, user fields and other entities.
We have main problems with comments, so I will try to help you with this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | emoji_scrub-entity-presave-2541428-6.patch | 2.27 KB | AlexKirienko |
Comments
Comment #1
AlexKirienko commentedI'm working on this issue.
Comment #2
timodwhit commented@AlexKirienkoex, I have a fix in place for comments using entity_presave. I am currently working on supporting field_collection and beans as well. Are there other entities that are heavily used?
Thanks for bringing this up.
Comment #3
AlexKirienko commentedI have demand for profile2 profiles, but profile2 don't use entities. So I will create separate issue for it.
Please check attached patch.
Comment #4
AlexKirienko commentedComment #5
timodwhit commented@AlexKirienkoex: It looks like we submitted changes around the same time. Please check out the latest changes, it looks like my current interation is missing signature. from the user, but most of the other stuff is covered in the "if" cases.
Also, for profile2, it might be good to have submodule emoji_scrub_profile2, that can be enabled on top of the emoji_scrub.
Comment #6
AlexKirienko commentedGreat.
Please check attached patch with some enhancements.
- Instead of 'und' better use LANGUAGE_NONE constant.
- emoji_scrub_entity_presave need to be executed first, emoji_scrub_module_implements_alter implemented.
- use foreach instead of many if()
Comment #8
timodwhit commentedThanks for the contribution. Your patch was added! Nice work.
Comment #9
AlexKirienko commentedGreat, thank you!