/***[INSERTED$$$$]***/ duplicate entry when compiling #1220

Closed
opened 2025-05-07 12:06:53 +00:00 by Joomla_Chris · 6 comments

Steps to reproduce the issue

I have inserted existing code with /***[INSERTED<>$$$$]***//*x*/ in a new file.
I compiled the project and the installed project uninstalled.
The custom code is correctly recognized and saved.
After compiling the project again, the code is inserted twice.
I have tested this with PHP 8.1.25 as well as with PHP 8.2

Actual result

/***[INSERTED$$$$]***//**3**/
if ($MailsContracts)
{
$taskname = substr($name,0,-1);
$task = '&task='.$taskname.'.edit&id=1';
}
/***[/INSERTED$$$$]***/
/***[INSERTED$$$$]***//**3**/
if ($MailsContracts)
{
$taskname = substr($name,0,-1);
$task = '&task='.$taskname.'.edit&id=1';
}
/***[/INSERTED$$$$]***/

System information (as much as possible)

  • OS Name & Version: Ubuntu 22.04
  • MySql Version: 10.4.32-MariaDB
  • Apache Version: Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.1.25 mod_perl/2.0.12 Perl/v5.34.1
  • PHP Version: 8.1.25
  • Joomla Version: Joomla! 5.3.0 Stable [ Timu ] 15-April-2025 16:00 GMT
  • JCB Version: 5.1.0
  • Browser: Chromium Version 136.0.7103.59 (Offizieller Build) snap (64-Bit)

Additional comments

### Steps to reproduce the issue I have inserted existing code with `/***[INSERTED<>$$$$]***//*x*/` in a new file. I compiled the project and the installed project uninstalled. The custom code is correctly recognized and saved. After compiling the project again, the code is inserted twice. I have tested this with PHP 8.1.25 as well as with PHP 8.2 ### Actual result `/***[INSERTED$$$$]***//**3**/` if ($MailsContracts) { $taskname = substr($name,0,-1); $task = '&task='.$taskname.'.edit&id=1'; } `/***[/INSERTED$$$$]***/` `/***[INSERTED$$$$]***//**3**/` if ($MailsContracts) { $taskname = substr($name,0,-1); $task = '&task='.$taskname.'.edit&id=1'; } `/***[/INSERTED$$$$]***/` ### System information (as much as possible) - OS Name & Version: Ubuntu 22.04 - MySql Version: 10.4.32-MariaDB - Apache Version: Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.1.25 mod_perl/2.0.12 Perl/v5.34.1 - PHP Version: 8.1.25 - Joomla Version: Joomla! 5.3.0 Stable [ Timu ] 15-April-2025 16:00 GMT - JCB Version: 5.1.0 - Browser: Chromium Version 136.0.7103.59 (Offizieller Build) snap (64-Bit) ### Additional comments
Author

I did another test.

I wanted to reimplement the code using /***[/INSERT<>$$$$]***/.

The code was entered twice in the custom codes.

I did another test. I wanted to reimplement the code using `/***[/INSERT<>$$$$]***/`. The code was entered twice in the custom codes.
Member

Please have a look at this tutorial on Custom Code Insertion.
It seems that there is a misunderstanding on how you add the /***[INSERT<>$$$$]***/ so that JCB will handle it correctly.
Hopefully this will help you get these custom codes to make your life easier. 😄

Please have a look at this [tutorial](https://www.youtube.com/watch?v=DFMfIl-VkSk) on Custom Code Insertion. It seems that there is a misunderstanding on how you add the `/***[INSERT<>$$$$]***/` so that JCB will handle it correctly. Hopefully this will help you get these custom codes to make your life easier. 😄
Author

This is an old tutorial, and I know it.
My "Actual result" is what JCB writes into.
Thanks

This is an old tutorial, and I know it. My "Actual result" is what JCB writes into. Thanks
Owner

I have not yet been able to duplicate this.

I have not yet been able to duplicate this.
Author

Hi Llewellyn
Thank you for your answer. This is very interesting.
I have now tested it with Mozilla Firefox and the problem does not exist. I don't understand why.
There must be something related to Chromium. But what and why.
kind regards

Hi Llewellyn Thank you for your answer. This is very interesting. I have now tested it with Mozilla Firefox and the problem does not exist. I don't understand why. There must be something related to Chromium. But what and why. kind regards

@Joomla_Chris yep, that's the problem, use Firefox only when you work with JCB.

@Joomla_Chris yep, that's the problem, use Firefox only when you work with JCB.
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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