- Issue created by @shelane
- πΊπΈUnited States TolstoyDotCom L.A.
I just took a quick look at the code and it looks like the JS is loaded if the spamspan filter is being used. Does tablefield let you specify which filters to use for a column?
- πΊπΈUnited States shelane
The "rich text" field formatter is set for the table. I looked a body field that is using the filter and that isn't looking quite right either. I entered the email address myemail@mail.com, but it is being displayed as myemailatmaildotcom.
- πΊπΈUnited States TolstoyDotCom L.A.
I set this up and I think the module is telling Drupal to load its JS. I'll look into what Drupal doesn't like about the module's JS tomorrow (unless someone else wants to look at it in the meantime).
- Status changed to Needs work
over 1 year ago 9:07am 25 July 2023 - π©πͺGermany Anybody Porta Westfalica
I guess this might indeed be an issue / conflict with table field. Could someone, who has it installed, take a closer look and prepare a MR?
- πΊπΈUnited States TolstoyDotCom L.A.
I created a text format with spamspan and used it with both a regular body field and a tablefield field. I copied AttachmentsTrait into FilterProcessResult and added logging to getAttachments(). For the body field, the value returned from getAttachments() contains this module's JS library. For the tablefield, it doesn't.
This seems like such an obscure case that it doesn't warrant more research but others might disagree. A workaround I found is to give a text field on the same page as tablefield the spamspan text filter and put an email address in it. That results in this module's JS being loaded. That field could be hidden using custom JS. Even better, the page could be altered by custom code to attach this module's JS.
- πΊπΈUnited States shelane
I have a twig template that is used for the paragraph that displays the table field. I have added
{{ attach_library('spamspan/obfuscate') }}
to the template and it is working. I'm not sure why the library isn't being called in on its own, but at least there is a work around. Thanks for verifying. I'm not sure that this issue should be closed though if someone is able to figure out why the filters aren't being applied correctly.It may be an issue that needs to be moved to the TableField module or just another issue added on their queue and mark this as related?
- π©πͺGermany Anybody Porta Westfalica
Thanks for your feedback. So I think we should set this minor, but it would be nice if someone could find out, why the library isn't loaded in this case. Perhaps using Xdebug?
- πΊπΈUnited States TolstoyDotCom L.A.
I created this issue: https://www.drupal.org/project/tablefield/issues/3380355 π Tablefield causes spamspan module's Javascript not to be loaded Active
"Throw it over the fence, let Arby's worry about it."