Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

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

6 years 5 months ago - 6 years 5 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.
Last edit: 6 years 5 months ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

6 years 5 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 5 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 or Create an account to join the conversation.

6 years 5 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 or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 5 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 or Create an account to join the conversation.

6 years 5 months ago - 6 years 5 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:
Code:
{source} [[?php $db = JFactory::getDbo(); ... ?]] ... {/source}

Now it also works with the CB Content Bot 4.0.1
Last edit: 6 years 5 months ago by schrammelmann.
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum