Chronoforms5 shortcode plugin don't render

Barlakoski 08 Mar, 2016
Hello!

I have a very strange issue by not rendering the shortcode plugin. You can see it here.

Plugin is published.

Any ideas where to check?
GreyHead 08 Mar, 2016
Hi Barlakoski,

Please double-check that you have the CFv5 plugin installed and enabled. I can't think of any other explanation.

Bob

PS you have the plug-in tags inside <p>tags which may cause the form to fail in some versions of IE as HTML does not permit <form> tags inside <p> tags. (This doesn't explain why the form isn't showing.)
Barlakoski 08 Mar, 2016
Hello again!

I think i found the issue, but i don't know why is changed:

Plugin code works by default with $this->text, but at my side, works only if $this->fulltext or $this->introtext

And now i cant really find where this is messed up!

If you have any idea, i will be glad to hear, if not, thanks anyway!
GreyHead 08 Mar, 2016
Hi Barlakoski,

The settings look correct to me.

Where are you using $this->text ? The shortcut has to be run in a place where Joomla! plug-ins are supported.

Bob
Barlakoski 08 Mar, 2016
this is plugin code:
if(isset($row->text)){
			preg_match_all($regex, $row->text, $matches);
			if(!empty($matches[1][0])){
				$chrono_data = $matches[1];
				foreach($chrono_data as $i => $match){
					$item_output = self::render_item($match);
					$row->text = str_replace($matches[0][$i], $item_output, $row->text);
				}
			}
		}else{
			$row->text = '';
		}
		return true;


If i change $this->text to $this->fulltext or $this->introtext (if plugin is used in introtext) all is fine.
GreyHead 08 Mar, 2016
Hi Barlakoski,

I'm not clear what problem you have?

When I test the chronoforms shortcut works before or after the 'readmore' element in the article.

Bob
Barlakoski 08 Mar, 2016
Answer
Ok let me put it this way:

My template uses $this->introtext and $this->fulltext separately, instead of unifying $this->text.

Thats why the plugin wont render the forms, because it must be called either for intro or fulltext, but not for text which combinea previous two into one.

You should consider this.

Thanks!
This topic is locked and no more replies can be posted.