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 is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#115777 PHP tags are commented when saving from code tab, not from Editor tab. How could I fix this ?

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by TAGLLC on Thursday, 28 March 2024 22:11 GMT

Balet
Hello,

I would be grateful if you could help me solve the following problem.

Every time I save content that includes php code from the code tab, all the php tags are commented out, whrether or not I use the sourcerer tags.

All works fine and the code is properly saved (and executed) if edited and saved from the editor tab in code blocks.

This is really boring as I need to work in code mode most of the time.

I am using Joomla 4.4.2, PHP 8.1, JCE 2.9.58, and Sourcerer 10.0.4.

Thanks in advance for any idea about how to fix the issue.

Kind regards

Ryan
In Editor Profiles -> Plugin Parameters -> Code Editor, set Validate Content to No.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Balet
Wonderful! thanks a lot Ryan.

TAGLLC
[quotePost id="115781"]In Editor Profiles -> Plugin Parameters -> Code Editor, set Validate Content to No.[/quotePost]

I'm sure I just missed it, even though I've looked at least 5 times very slowly, so can you please review this information and let me know if something has changed?

I "cannot" find Code Editor nor Validate Content anywhere within the Plugin Parameters.
Is it relocated?

I'm using version 2.9.63

Ryan
Assuming you have JCE Pro installed, and the Code Editor option is checked in Editor Profiles -> Features & Layout (at the bottom in the Additional Features section), then the Validate Content option is in Editor Profiles -> Plugin Parameters -> Code Editor:

https://cdn.joomlacontenteditor.net/tmp/115777-php-tags-are-commented-when-saving-from-code-tab-not-from-editor-tab-how-could-i-fix-this.jpg

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

TAGLLC
OH! I need to switch to Pro...I have it, just not in this particular site.
That makes a lot more sense. I was really getting worried that I'd just not paid enough attention.

Thank you!

TAGLLC
Sorry to bother you again.
That didn't work.

I installed Pro, even updated to 2.9.63, verified that at the bottom, Code Editor is enabled (has a check), went into Plugin Parameters and verified that I disabled Validate Content (set to No), cleared cache, then disabled cahe and cleared it all again.

When I returned to the module where I've entered the code, I remove the comments, saved, and the comments returned inside the php tags =

What did I do wrong?

GOT IT! I had to keep digging because I usually just drop code into the source tab and assure that HTML Validation is off.
You've updated and "I" didn't.

When I found information about the code blocks, then I had to figure that out - did - found where to enable them (after failing a few times to find the right spot), and tried again. Success!

Thank you!

TAGLLC
I don't know if this is a JCE issue or Joomla issue now.
I've successfully added the php code into the module and saved it.
But, on the front end, I can see the code is still commented inside the php tags.

Does this mean a "helper" plugin is required? Or is there somewhere else that I need to set something?

I broke down and installed Sorcerer and that worked well!

Sorry for the interruptions. Thank you much.