Open ajaxboy opened 8 years ago
@ajaxboy
I was able to fix this problem in CJAX 6.0 Beta 1(will be available soon). The issue is with the method CoreEvents::jsCode(), specifically this line:
$data = "<script>". highlight_string("\n" . $data ."\n");
As you can see, the code wraps data inside script tag, but it only adds an opening script tag, without a closing script tag. For this reason, calling method jsCode() will render the rest of lines to be javascript, effectively messing up the HTML of a page.
To fix this issue, simply change this line to:
$data = "<script>". highlight_string("\n" . $data ."\n")."</script>";
And the creating plugins page should appear normally, as it shows up on CJAX 6.0 Beta's demo site: http://mysidiarpg.com/site/cjax/cjax600b1/examples/plugins.php
Very nice. Thanks. That ought do it
You are welcome, I will make a push request for CJAX master branch regarding this change.
The documentation for Demo "Creating Plugins(+Javascript API +PHP API)" appears to be broken and only shows partial information, while there is much more info than the one that appears.
Link: http://cjax.sourceforge.net/examples/plugins.php