Wrong JCB code tags for custom code in html area #860
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#860
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
add custom code in site view html field
Expected result
custom code added with JCB comments
<!--[INSERTED$$$$]--> and <!--[/INSERTED$$$$]-->
Actual result
comments added in php tags
/***[INSERTED$$$$]***//**15**/ and /***[/INSERTED$$$$]***//**15**/
System information (as much as possible)
Additional comments
I need a fast hardcode instruction as I have to deliver the package to the customer. Thanks.
This is the notes on the subject:
https://github.com/vdm-io/Joomla-Component-Builder/wiki/TIPS:-Custom-Code
You should never ship any code with custom coding placeholders in a deliverable for production, as this is considered bad practice.
You can not start with
INSERTED
.... you must alwasy start withINSERT
and JCB will change that toINSERTED
So the custom code to start a replace or a insertion is:
/***[INSERT<>$$$$]***/
and/***[/INSERT<>$$$$]***/
/***[REPLACE<>$$$$]***/
and/***[/REPLACE<>$$$$]***/
Or for HTLM
<!--[INSERT<>$$$$]-->
and<!--[/INSERT<>$$$$]-->
<!--[REPLACE<>$$$$]-->
and<!--[/REPLACE<>$$$$]-->
There is a missunderstanding...
I've just updated JCB and there is a BUG! The same component works perfectly on an old JCB version 2.11.2
Please, see the attached image.
Okay this is weird as I have many extensions with
CUSTOMCODE
and they still build with no error. What exactly is the problem?There is in the normal custom field no HTML area, so not sure where you are working... custom fields only have PHP area.
I'm working in site view, html area (which will output the template/default.php file), field: Default Tmpl.
I place the code as shown in the image of previous post. It works fine in all old versions (I have other 5 installations of JCB, all older). Today I had to update this joomla to the latest version and JCB too as it did'nt work anymore (after compile buttons links broken).
Now I have this problem, JCB comments are shown in the html output.
What version of PHP are you using?
I can't reproduce your error so I can't debug it.
All JCB installations are running on php v.7.3.8 but I think I've to investigate what's happened with the upgrade...
ok, I think I can say you how to reproduce the error.
Create a new component, for admin side add Demo's Look admin view, for site side create a new view and just add the custom code as html output (a dummy dynamic get).
Compile and install.
Okay I tried this and still no issue, let me ask the obvious question... is your custom code comment type set to HTML?
Hi, thanks, yes to all.
Ok, I understand I have to investigate in my own installation what is gone wrong when I've the time. By now I just manually clean up the compiled code. Luckly is not that much work. Thanks for your effort!