evaluate_scripting() may generate superfluous output

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

evaluate_scripting() may generate superfluous output

Post by cmb » Fri Aug 29, 2014 11:40 am

Hello Community,

I have just learned that evaluate_scripting() often has side effects which are undesirable. For instance when the search function is executed, all scriptings on all pages are evaluated, so that the generated contents will be searched as well. That is fine. However, that will also cause any output of the scripts (except the return value) to be contained on the search results page. Apparently that doesn't hurt (at least I'm not aware of any real problems), but it is useless at least.

We should consider to ignore this superfluous output, or to reset the respective variables ($hjs, $bjs, $e, etc.) I'm not sure what is the best way to make this possible; maybe adding a boolean parameter to evaluate_scripting() is sufficient.

Furthermore I'm not sure if that change might not break some functionality, so I suggest to postpone it to XH 1.7 at least, where we'll have a beta phase.

Thought?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply