included PHP does not work unless HTML text is present

ATS's Avatar

ATS

11 Feb, 2015 09:25 PM

When I include PHP, it does not work unless I add some HTML text right before the PHP code section:

hi<br /> <!--#passthrough<?php include_once $_SERVER['ATS_CORE_PHP_LIB_PATH'].'/web/thoracic/committee_detail_inc.php'?>#passthrough-->

If I remove the text 'hi', the PHP will not run.

  1. Support Staff 1 Posted by Tim on 11 Feb, 2015 09:57 PM

    Tim's Avatar

    Hi,

    Can you tell me which version of the software you are using?

    Thanks

  2. 2 Posted by Michael Clayton on 12 Feb, 2015 03:00 PM

    Michael Clayton's Avatar

    Version 7.12.3

  3. 3 Posted by Wing Ming Chan on 12 Feb, 2015 03:59 PM

    Wing Ming Chan's Avatar

    Hi,

    I always put an empty div element before the code.

    Wing

  4. Support Staff 4 Posted by Tim on 13 Feb, 2015 09:12 PM

    Tim's Avatar

    My guess is that you may be using Firefox. Can you confirm? I tried this locally and didn't have any issues in Chrome, but when I tried Firefox, I did get the additional <br /> tag added before the content. This appears to be an issue with TinyMCE as the problem occurs immediately after clicking Insert (prior to submitting the Page). For kicks, I went to the TinyMCE demo page and while that is a newer version of the editor, it still has similar behavior (although in this case it adds <p>&nbsp;</p> as opposed to <br />.

    Since we don't have too much control over this at this point in time, you could potentially workaround this by doing one of the following:

    • Add an empty <div> element before the code (as Wing suggested above)
    • Use a browser other than Firefox (let me know if you aren't using Firefox when seeing this behavior)
    • Include your code in an XML Block as opposed to a Page/XHTML Block. Doing so will bypass TinyMCE entirely.

    I hope this helps. Let me know if you have any additional questions.

    Thanks

  5. Tim closed this discussion on 17 Apr, 2015 06:55 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM