You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Editor
- JCE Editor Pro garbling PHP code
Support is currently Online
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
A second thing that used to work fine before 2.6.19:
I use DirectPHP to add PHP to articles and modules. You have to enter it into the Editor view, not the html view. But now JCE is modifying the code. For instance, I have a snippet that I add to the end of articles
<?php
$ogImage = '';
include 'php/article_metadata.php';
?>
I enter this using Outertech Clipboard History (highly recommended!), but the issue occurs also if I type it in manually. JCE immediately removes the opening <?php. If I look at the code, it is:
<p>
<!--?php<br-->$ogImage = '';<br />include 'php/article_metadata.php';<br />?></p>
Furthermore, if I work round this by typing into the code view
<p><?php<br />$ogImage = ' ';<br />include 'php/article_metadata.php';<br />?></p>
and look in edit view, it is now correct. But it would be easier to be able to enter the code in editor view.
Any idea what is causing this? I have Validate HTML set to No, Doctype set to HTML5 and Entity Encoding set to Numeric.
I use DirectPHP to add PHP to articles and modules. You have to enter it into the Editor view, not the html view. But now JCE is modifying the code. For instance, I have a snippet that I add to the end of articles
<?php
$ogImage = '';
include 'php/article_metadata.php';
?>
I enter this using Outertech Clipboard History (highly recommended!), but the issue occurs also if I type it in manually. JCE immediately removes the opening <?php. If I look at the code, it is:
<p>
<!--?php<br-->$ogImage = '';<br />include 'php/article_metadata.php';<br />?></p>
Furthermore, if I work round this by typing into the code view
<p><?php<br />$ogImage = ' ';<br />include 'php/article_metadata.php';<br />?></p>
and look in edit view, it is now correct. But it would be easier to be able to enter the code in editor view.
Any idea what is causing this? I have Validate HTML set to No, Doctype set to HTML5 and Entity Encoding set to Numeric.
I enter this using Outertech Clipboard History (highly recommended!), but the issue occurs also if I type it in manually. JCE immediately removes the opening <?php. If I look at the code, it is:
<p>
<!--?php<br-->$ogImage = '';<br />include 'php/article_metadata.php';<br />?></p>
I'm not seeing this on the demo site - https://demo.joomlacontenteditor.net/
Does this happen when you save the content, or when you switch from the Editor tab to the Code tab?
Just because you're not paranoid doesn't mean everybody isn't out to get you.
My apologies, Ryan. I said that when entering the php code manually the same thing happened. It turns out not to be the case, don't know how I came to that conclusion, should do more rigorous testing.
It turns out that the issue arises only when pasting into the editor and the <?php opening tag is being misinterpreted as <!-- php. If I type <?php into a text editor then copy and paste into JCE, nothing shows in the editor, while in the code I see
<p>
<!--?php-->
</p>
If I just type <?php into the editor, it works normally.
I don't know whether the fact that I have Clipboard History installed on my computer is affecting how cut-and-paste works on the computer. I haven't got a computer without Clipboard History installed to test it on, so could you try copying and pasting <?php into the editor and see if the same thing happens?
This certainly has only become a problem in recent weeks and I still suspect that it was updating to 2.6.19, which I did rather belatedly.
It turns out that the issue arises only when pasting into the editor and the <?php opening tag is being misinterpreted as <!-- php. If I type <?php into a text editor then copy and paste into JCE, nothing shows in the editor, while in the code I see
<p>
<!--?php-->
</p>
If I just type <?php into the editor, it works normally.
I don't know whether the fact that I have Clipboard History installed on my computer is affecting how cut-and-paste works on the computer. I haven't got a computer without Clipboard History installed to test it on, so could you try copying and pasting <?php into the editor and see if the same thing happens?
This certainly has only become a problem in recent weeks and I still suspect that it was updating to 2.6.19, which I did rather belatedly.
Hello again Ryan.
As per my other thread, I discovered a development website which still has 2.6.11. The <?php issue doesn't show up, so it must be caused by something that has changed in a more recent update, and I think it was 2.6.19 (though I may have skipped one or two updates before 2.6.19, so it might have been earlier.
As per my other thread, I discovered a development website which still has 2.6.11. The <?php issue doesn't show up, so it must be caused by something that has changed in a more recent update, and I think it was 2.6.19 (though I may have skipped one or two updates before 2.6.19, so it might have been earlier.
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Please try JCE Pro 2.6.21 RC6 - https://www.joomlacontenteditor.net/downloads/editor/category/development
Just because you're not paranoid doesn't mean everybody isn't out to get you.
Hi Ryan,
Sorry to be so slow testing this - I see you're already on RC7.
Unfortunately, RC7 doesn't fix the php issue, but it has fixed the unwanted <p> tags issue.
I can work round the php issue by typing <?php manually, then pasting the rest of the code.
Thanks,
Basil
Sorry to be so slow testing this - I see you're already on RC7.
Unfortunately, RC7 doesn't fix the php issue, but it has fixed the unwanted <p> tags issue.
I can work round the php issue by typing <?php manually, then pasting the rest of the code.
Thanks,
Basil
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!