Replacer error

1 year 1 month ago #332652 by liaskas
Replacer error was created by liaskas
Hello,
Based on your reply on post here...
www.joomlapolis.com/forum/153-professional-member-support/237175-bad-word-filter

i installed replacer on my system to achieve the same result (replace e-mails in timeline posts).

I enabled "Prepare Content" Activity > Parser for stream

Entered the following regex to Content - Community Builder Replacer
From String: \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b (tested and it works regex101.com/)
To String: *Removed*

If all checkboxes unchecked (Is REGEXP, Is Case Sensitive, Translate From and To, Process To Substitutions) nothing happens, like we have not replacer enabled.

If we check Is REGEXP, on the front page we get...

0 Return value of CBContentModuleHelper::prepareHtmlContentPlugins() must be of the type string, null returned

Can you please advise?

Thank you.
 

Please Log in to join the conversation.

1 year 1 month ago #332653 by krileon
Replied by krileon on topic Replacer error
Your REGEXP is invalid so you're causing a fatal PHP error, which is cascading to other usages that call content plugins.

You didn't supply a delimiter. regex101 shows you the delimiter at the beginning and end with the modifiers with a dropdown option to change the delimiter and modifiers. Delimiter and modifiers are also visible in the Explanation section. Use the copy button to properly copy the full REGEXP with its delimiter and modifiers.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 1 month ago #332659 by liaskas
Replied by liaskas on topic Replacer error
Copied the full REGEXP and inserted
/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi
in "From String" field.

Unfortunately i get
0 Return value of CBContentModuleHelper::prepareHtmlContentPlugins() must be of the type string, null returned
again

Please Log in to join the conversation.

1 year 1 month ago #332660 by krileon
Replied by krileon on topic Replacer error
Below would be the valid REGEXP.

From String:
/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/
Is REGEXP: CHECKED

This works fine in my tests. If issue persists please be sure CB Content Module is up to date as that's what is erroring. If issue persists after updating check your CB Content Modules and try resaving them as it's possible you have a module that's empty trying to process content plugins although they should be skipped if up to date.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 1 month ago - 1 year 1 month ago #332661 by liaskas
Replied by liaskas on topic Replacer error
Yes...
replaced the regexp you suggested and the error is now gone.

Now in front end, i create a new activity as a user.

Activity text...
hello my name is A and my e-mail is a@domain.com
hello my name is B and my e-mail is B@gmail.com
hello my name is B and my e-mail is c@yahoo.gr
Privacy: Private

The result is this...
 

Mails are not replaced!
Attachments:

Please Log in to join the conversation.

1 year 1 month ago #332663 by krileon
Replied by krileon on topic Replacer error
Where did you enable content plugins and what stream is that? Did you enable them globally or for a specific stream? Content plugins are probably not being applied to that stream is why it isn't working.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.368 seconds