Difference in code generated with JCB V3.1.15 regarding Alias Builder in admin view #973

Closed
opened 2023-02-06 10:09:46 +00:00 by Tom van der Laan · 9 comments

Steps to reproduce the issue

Compile component in older version (2.1.16)
Compile same component in new version (3.1.15)

Expected result

Same code for alias builder

Actual result

Different code for alias builder.

System information (as much as possible)

  • OS Name & Version: Macos Latest
  • MySql Version: 10.3.x
  • Apache Version: 2.4.x
  • PHP Version: 7.4.x
  • Joomla Version: 3.10.11
  • JCB Version: 2.1.16 & 3.1.15
  • Browser: Safari latest

Additional comments

So i compiled the component in both an old version 2.1.16 and new one 3.1.15

And i noticed a difference in code being generated between these versions for the alias builder.

It seems it is not taking the custom alias builder into account.

Old code:

list($this->table->opleiding, $this->table->school, $this->table->alias) = $this->_generateNewTitle($this->table->alias, array($this->table->opleiding, $this->table->school));

New code:

list($this->table->opleiding, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->opleiding);

It is in the admin model single view.php

There is no corresponding site view model.

I've got a private github repo set up to test all the changes made.
If ever you need access to that let me know.

### Steps to reproduce the issue Compile component in older version (2.1.16) Compile same component in new version (3.1.15) ### Expected result Same code for alias builder ### Actual result Different code for alias builder. ### System information (as much as possible) - OS Name & Version: Macos Latest - MySql Version: 10.3.x - Apache Version: 2.4.x - PHP Version: 7.4.x - Joomla Version: 3.10.11 - JCB Version: 2.1.16 & 3.1.15 - Browser: Safari latest ### Additional comments So i compiled the component in both an old version 2.1.16 and new one 3.1.15 And i noticed a difference in code being generated between these versions for the alias builder. It seems it is not taking the custom alias builder into account. Old code: ``` list($this->table->opleiding, $this->table->school, $this->table->alias) = $this->_generateNewTitle($this->table->alias, array($this->table->opleiding, $this->table->school)); ``` New code: ``` list($this->table->opleiding, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->opleiding); ``` It is in the admin model single view.php There is no corresponding site view model. I've got a private github repo set up to test all the changes made. If ever you need access to that let me know.
Llewellyn added a new dependency 2023-02-06 11:09:20 +00:00
Owner

Can you test this with version any of the version 3.x releases as we no longer support version 2 at all... we moved all our systems to version 3+ of JCB as explained with the when we merger the public and pro version into one.

So I basically want to know in what version JCB 3.x does this feature still work. I don't use this feature an that is why I missed it...

Can you test this with version any of the version 3.x releases as we no longer support version 2 at all... we moved all our systems to version 3+ of JCB as explained with the when we merger the public and pro version into one. So I basically want to know in what version JCB 3.x does this feature still work. I don't use this feature an that is why I missed it...
Owner

Side note, this is the class that turns the feature on or off... we store the alias values in the registry, and we act on these values later in the interpretation class.

I will do some debugging on this... I am sure its a small issue.

Side note, this is the [class](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Model/Customalias.php) that turns the feature on or off... we store the alias values in the registry, and we act on these values later in the interpretation class. I will do some debugging on this... I am sure its a small issue.
Owner

Well in fact as I re read the comment I just made and looked at the class I just solved the issue, I should have added the code to the registry, but instead added it to the config class. I will push a quick fix for you to test.

Well in fact as I re read the comment I just made and looked at the class I just solved the issue, I should have added the code to the registry, but instead added it to the config class. I will push a quick fix for you to test.
Llewellyn referenced this issue from a commit 2023-02-06 11:29:46 +00:00
Author
Member

I can confirm this fixes it. 👍

I can confirm this fixes it. 👍
Author
Member

I noticed in JCB dashboard itself version is still on 3.1.13.

I noticed in JCB dashboard itself version is still on 3.1.13.
Owner

Yes the last release has not yet been moved out to all, there is known bugs that still need resolving. Like the whole change over to the new encryption and server classes is still ongoing.

The encryption has been one of the least used features in JCB, but my client who do use them are very important, and so I had to resolve this, and this required me to study the whole implementation of FOF before I could effectively replace it. Now having the replacement we need to add the new function feature from power area.

This requires much more explanation... but in sort. The new compiler will have features that does not ship with the JCB package, but are imported from https://git.vdm.dev as needed. Once imported the code will live in the powers area, and can be updated manually... and should you like the change to become part of JCB permanently, we will add an easy way to push it up for review.

This area will become a easy way to move powers to https://git.vdm.dev and back into your other installed instances. Yes the manual way of JCB package export will also be able to do this... but this feature require the click of one or two buttons and your done.

But most importantly this feature is need to access power classes not shipped by default with JCB, seeing that the JCB Joomla package is already much bigger than it should be.

Yes the last release has not yet been moved out to all, there is known bugs that still need resolving. Like the whole change over to the [new encryption](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/FOF.php) and [server classes](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server) is still ongoing. The encryption has been one of the least used features in JCB, but my client who do use them are very important, and so I had to resolve this, and this required me to study the whole implementation of FOF before I could effectively replace it. Now having the [replacement](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt/FOF.php) we need to add the new function feature from power area. This requires much more explanation... but in sort. The new compiler will have features that does not ship with the JCB package, but are imported from https://git.vdm.dev as needed. Once imported the code will live in the powers area, and can be updated manually... and should you like the change to become part of JCB permanently, we will add an easy way to push it up for review. This area will become a easy way to move powers to https://git.vdm.dev and back into your other installed instances. Yes the manual way of JCB package export will also be able to do this... but this feature require the click of one or two buttons and your done. But most importantly this feature is need to access power classes not shipped by default with JCB, seeing that the JCB Joomla package is already much bigger than it should be.
Owner

We can close this, since the issue is resolved.

We can close this, since the issue is resolved.
Author
Member

Ok yeah i already noticed medium encryption note field was removed also from my component. That is expected behaviour?

Ok yeah i already noticed medium encryption note field was removed also from my component. That is expected behaviour?
Owner

Yes...

Yes...
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
#964 jcb for joomla4
joomla/Component-Builder
Reference: joomla/Component-Builder#973
No description provided.