After Upgrade of JCB, [[[SITE_TOOLBAR]]] is not translated anymore #969

Open
opened 2023-01-25 12:40:05 +00:00 by Pierre Burri-Wittke · 7 comments

Steps to reproduce the issue

Upgrade JCB from the version 2.12.16 step by step (2.13.0, 2.13.1, 2.13.2 etc) to the last version 3.1.12 and test a component with a site view wich has a custom button.

Expected result

the component written with JCB version 2.12.16 still works with version 3.1.12

Actual result

on a site view with a custom button,

[[[SITE_TOOLBAR]]]

is shown instead of expected button.

System information (as much as possible)

  • OS Name & Version: MacOS Catalina
  • MySql Version: 5.7.34
  • Apache Version: 2.4.46
  • PHP Version: 8.1
  • Joomla Version: 3.10.11
  • JCB Version: 3.1.12
  • Browser: Firefox 102.6.0esr

Additional comments

if it helps, I could find out with upgrade/version made this problem.

### Steps to reproduce the issue Upgrade JCB from the version 2.12.16 step by step (2.13.0, 2.13.1, 2.13.2 etc) to the last version 3.1.12 and test a component with a site view wich has a custom button. ### Expected result the component written with JCB version 2.12.16 still works with version 3.1.12 ### Actual result on a site view with a custom button, ``` [[[SITE_TOOLBAR]]] ``` is shown instead of expected button. ### System information (as much as possible) - OS Name & Version: MacOS Catalina - MySql Version: 5.7.34 - Apache Version: 2.4.46 - PHP Version: 8.1 - Joomla Version: 3.10.11 - JCB Version: 3.1.12 - Browser: Firefox 102.6.0esr ### Additional comments if it helps, I could find out with upgrade/version made this problem.
Owner

Okay, the PHP version that we are sure works is 7.4 (which I know is not good) but can you test this on that version? I am working on the refractory of the compiler and then we should be PHP 8+ ready including being able to compile for Joomla 4+

So at this point we are only PHP 7.4 able...

So I assume that running JCB on 7.4 should resolve this issue.

Okay, the PHP version that we are sure works is 7.4 (which I know is not good) but can you test this on that version? I am working on the refractory of the compiler and then we should be PHP 8+ ready including being able to compile for Joomla 4+ So at this point we are only PHP 7.4 able... So I assume that running JCB on 7.4 should resolve this issue.

I redid it step by step with PHP 7.4.21, and this problem [SITE_TOOLBAR] happens with JCE 3.1.6. With JCE version 3.1.5 it still worked.
After that, I didn't try to install JCE 3.1.7.

I redid it step by step with PHP 7.4.21, and this problem [[[SITE_TOOLBAR]]] happens with JCE 3.1.6. With JCE version 3.1.5 it still worked. After that, I didn't try to install JCE 3.1.7.
Owner

So let me get this straight you are using JCE as your code editor for this site/custom view default content area.

If this is the case, then please use none (editor) or CodeMirror. These are the only editors we have been trying to support.

We are looking at adding our own code editor (plugin) for JCB... but this not high priority at this point.

I should have picked this up sooner, that your using JCE as your code/text editor. JCE has never really been able to manage the code side of things well. Which is because their main focus has been HTML, and not PHP,CSS,Javascript... where JCB all most only has those kinds of text areas.

So let me get this straight you are using JCE as your code editor for this site/custom view default content area. If this is the case, then please use none (editor) or CodeMirror. These are the only editors we have been trying to support. We are looking at adding our own code editor (plugin) for JCB... but this not high priority at this point. I should have picked this up sooner, that your using JCE as your code/text editor. JCE has never really been able to manage the code side of things well. Which is because their main focus has been HTML, and not PHP,CSS,Javascript... where JCB all most only has those kinds of text areas.

@Llewellyn it's a typo. He means JCB. JCE latest version is only 2.9.x so can't be JCE.

@Llewellyn it's a typo. He means JCB. JCE latest version is only 2.9.x so can't be JCE.

yes it was a typo, I meant JCB and not JCE... sorry.

(I'm using PHPStorm editing and debugging my extension)

yes it was a typo, I meant JCB and not JCE... sorry. (I'm using PHPStorm editing and debugging my extension)
Pierre Burri-Wittke changed title from After Upgrade of JCE, [[[SITE_TOOLBAR]]] is not translated anymore to After Upgrade of JCB, [[[SITE_TOOLBAR]]] is not translated anymore 2023-01-26 17:45:02 +00:00
Owner

Okay... so the code the currently does this is found here.

So what we are doing is adding the placeholder SITE_TOOLBAR to the global placeholder class, and then we use that to update the default site/custom_admin view content.

I should soon be able to push some stable changes out. The reality is we are moving 30k+ lines of code... and it is huge amount of work to achieve that kind of stability.

I just ran a test on my system with the current changes and this issue seems resolved, but then I never had this issue on my side.

What is important is the the [[[SITE_TOOLBAR]]] must end in the database, and not get stripped by the editor your using to add the code.

Okay... so the code the currently does this is [found here](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/admin/helpers/compiler/e_Interpretation.php#L5529). So what we are doing is adding the placeholder `SITE_TOOLBAR` to the global placeholder class, and then we use that to update the default site/custom_admin view content. I should soon be able to push some stable changes out. The reality is we are moving 30k+ lines of code... and it is huge amount of work to achieve that kind of stability. I just ran a test on my system with the current changes and this issue seems resolved, but then I never had this issue on my side. What is important is the the `[[[SITE_TOOLBAR]]]` must end in the database, and not get stripped by the editor your using to add the code.

thanks a lot! it works very well.
JCB is again and again very impressive - tanks for our support.

thanks a lot! it works very well. JCB is again and again very impressive - tanks for our support.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#969
No description provided.