[SOLVED] Issue with CB 2.2 and Regular Labs Sourcerer Plugin

5 years 10 months ago - 5 years 10 months ago #305503 by schrammelmann
Hello,

I need the Regular Labs Sourcerer Plugin on my site, to execute code within joomla articles.
The plugin surrounds code with special tags: e.g.: {source} ... code ...{/source}

After Upgrade from CB 2.1.4 to 2.2.0 the sourcerer tags seems to be eliminated by CB. So the code is not executed, instead it is shown on the page.

I figured out that if I disable the CB Content Bot Plugin, sourcerer tags are working and the code is executed, Also I noticed that this Plugin wasn't updated recently (Version 4.0.1 from 2016-06-08). Is it possible that this substitution of sourcerer tags happens in the CB Core.

Any suggestions? Thanks.

PS: I tried various combinations of sourcerer tags, but they were all removed.

Please Log in to join the conversation.

5 years 10 months ago #305504 by schrammelmann
Replied by schrammelmann on topic Issue with CB 2.2 and Regular Labs Sourcerer Plugin
addition/correction: my current problem is in a custom module, not in an article

Please Log in to join the conversation.

5 years 10 months ago #305518 by krileon
CB Content Bot wasn't updated in CB 2.2 so there's nothing in CB 2.2 release that could be breaking this. CB Content Bot also only acts on CB substitution syntax (of which if is invalid or no CB substitution is found is just output as supplied). Try changing the execution order of your plugins to ensure Sourcerer is ran first by ensuring it's ordered first in Extensions > Plugins and see if that resolves it.

Also please be sure CB Content Bot is latest release as older releases used to reverse htmlspecialchars encoding, which caused some problems in other content plugins; latest release no longer does this.


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.

5 years 10 months ago #305561 by schrammelmann
Replied by schrammelmann on topic Issue with CB 2.2 and Regular Labs Sourcerer Plugin
Thank you Kyle and thank you for the hint with reverse htmlspecialchars encoding!

I noticed, I had previously installed a very old version of CB Content Bot (3.0.1). With the update of CB 2.2 I had also updated the bot to 4.0.1.

For testing I went back now to 3.0.1 and it works again.
I understand your explanation of how the bot works. Accordingly, it can not be true what I tell. Do you have any idea?

Sourcerer is a system plugin and Content Bot is a content plugin. Therefore, I can not set the order as recommended. Within the system plugins, I put it first.

Strange that nobody had that problem with Sourcerer and CB Content Bot 4.0.1 yet.

By the way: great job with CB 2.2, thank you!

Please Log in to join the conversation.

5 years 10 months ago #305591 by krileon
CB Content Bot 3.x would reverse htmlspecialchars, which it shouldn't. CB Content Bot 4.x has fixed this and won't break any encoding. Try using {cb}CB_SUBSTITUTIONS_HERE{/cb} so CB Content Bot only parses the text inside the {cb}{/cb} for substitutions.


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.

5 years 10 months ago - 5 years 10 months ago #305612 by schrammelmann
Replied by schrammelmann on topic Issue with CB 2.2 and Regular Labs Sourcerer Plugin
Well, I found a solution that works for me.

The old Sourcerer configuration with Content Bot 3.0.1: works
The old Sourcerer configuration with Content Bot 4.0.1: does not work
No matter which Sourcerer Tag style I used, {source} or whatever.

My solution is to change the tag style for "<" and ">" inside the code to double square brackets:
{source}
[[?php
    $db = JFactory::getDbo();
    ...
?]]
...
{/source}

Now it also works with the CB Content Bot 4.0.1
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.195 seconds

Facebook Twitter LinkedIn