Wrong JCB code tags for custom code in html area #860

Closed
opened 2022-02-01 12:16:03 +00:00 by jcodewalker · 12 comments
jcodewalker commented 2022-02-01 12:16:03 +00:00 (Migrated from github.com)

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)

  • OS Name & Version:
  • MySql Version:
  • Apache Version:
  • PHP Version:
  • Joomla Version: 3.10
  • JCB Version: 2.12.15 master
  • Browser:

Additional comments

I need a fast hardcode instruction as I have to deliver the package to the customer. Thanks.

### 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) - OS Name & Version: - MySql Version: - Apache Version: - PHP Version: - Joomla Version: 3.10 - JCB Version: 2.12.15 master - Browser: ### 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.

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 with INSERT and JCB will change that to INSERTED

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<>$$$$]-->

You can not start with `INSERTED`.... you must alwasy start with `INSERT` and JCB will change that to `INSERTED` 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<>$$$$]-->`
jcodewalker commented 2022-02-01 13:54:35 +00:00 (Migrated from github.com)

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.
Schermata 2022-02-01 alle 14 51 46

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. ![Schermata 2022-02-01 alle 14 51 46](https://user-images.githubusercontent.com/49115855/151981187-4dd32c18-1daf-4335-9051-2f83b2adbde5.png)

Okay this is weird as I have many extensions with CUSTOMCODE and they still build with no error. What exactly is the problem?

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.
image

There is in the normal custom field no HTML area, so not sure where you are working... custom fields only have PHP area. ![image](https://user-images.githubusercontent.com/5607939/152029464-892b28f1-6149-49be-b1d2-a34e3230decb.png)
jcodewalker commented 2022-02-01 19:35:44 +00:00 (Migrated from github.com)

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.

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?

What version of PHP are you using?

I can't reproduce your error so I can't debug it.

I can't reproduce your error so I can't debug it.
jcodewalker commented 2022-02-02 12:04:49 +00:00 (Migrated from github.com)

All JCB installations are running on php v.7.3.8 but I think I've to investigate what's happened with the upgrade...

All JCB installations are running on php v.7.3.8 but I think I've to investigate what's happened with the upgrade...
jcodewalker commented 2022-02-02 13:08:36 +00:00 (Migrated from github.com)

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.

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?
image
image
image
image
image

Okay I tried this and still no issue, let me ask the obvious question... is your custom code comment type set to HTML? ![image](https://user-images.githubusercontent.com/5607939/152517861-f4398bab-97a1-4451-b346-7f3620104200.png) ![image](https://user-images.githubusercontent.com/5607939/152517931-e1cafe71-f199-4287-8bfb-7bc59b3c5ac4.png) ![image](https://user-images.githubusercontent.com/5607939/152517974-a66e1880-447c-41aa-a734-210f3c5b3c7e.png) ![image](https://user-images.githubusercontent.com/5607939/152518190-c2547517-25a8-4e98-b83e-fff793368a05.png) ![image](https://user-images.githubusercontent.com/5607939/152518301-eddd56b7-5179-45ef-8f90-a7c63e33e7a4.png)
jcodewalker commented 2022-02-04 11:34:35 +00:00 (Migrated from github.com)

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!

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!
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#860
No description provided.