stylesheet versioning not available in Joomla 3.6.5 but JCB uses it. #217

Closed
opened 2018-01-14 04:41:33 +00:00 by kevincam3 · 10 comments
kevincam3 commented 2018-01-14 04:41:33 +00:00 (Migrated from github.com)

I noticed I was having a problem with the style sheet for my site view not rendering. Looking at the code in dev tools it's of type="Array" see screenshot
image

Digging around I noticed that in 3.6.5 you can't pass an array for the attributes of the stylesheet see attached signature:
image

The code from Component Builder is doing this. See below:
image

So my question is what version of Joomla! is the minimum requirement for Component Builder?

System information (as much as possible)

  • OS Name & Version:
  • MySql Version:
  • Apache Version:
  • PHP Version:
  • Joomla Version: 3.6.5
  • JCB Version: 3.6.9
  • Browser:

Additional comments

I noticed I was having a problem with the style sheet for my site view not rendering. Looking at the code in dev tools it's of type="Array" see screenshot ![image](https://user-images.githubusercontent.com/870934/34912891-04a6904a-f8d4-11e7-8f10-caa8ebf26fa8.png) Digging around I noticed that in 3.6.5 you can't pass an array for the attributes of the stylesheet see attached signature: ![image](https://user-images.githubusercontent.com/870934/34912895-3b860afa-f8d4-11e7-9f1d-0fd4bdc2d83e.png) The code from Component Builder is doing this. See below: ![image](https://user-images.githubusercontent.com/870934/34912896-4c2dbb0a-f8d4-11e7-9df4-60626acd0672.png) So my question is what version of Joomla! is the minimum requirement for Component Builder? ### System information (as much as possible) - OS Name & Version: - MySql Version: - Apache Version: - PHP Version: - Joomla Version: 3.6.5 - JCB Version: 3.6.9 - Browser: ### Additional comments
mwweb commented 2018-01-14 05:49:01 +00:00 (Migrated from github.com)

I'll let Llewellyn answer definitively, but i believe there was a discussion back when we started on removing repeatable fields that enhancements may be coded to three current supported version of Joomla, which would be 3.8.3.

I'll let Llewellyn answer definitively, but i believe there was a discussion back when we started on removing repeatable fields that enhancements may be coded to three current supported version of Joomla, which would be 3.8.3.

Okay the current implementation will always aim to target the latest stable version of Joomla. This means if you would like to compile for older version, you should also use an older version of JCB.

We could build a table showing what version of JCB targets what version of Joomla, yet this has not yet been done, any of you can take a go at it if you like.

But the current trend is to keep JCB in sync with the current stable Joomla release. Which will naturally mean adaption code implementation to be most applicable to the active version of Joomla.

So addressing this issue of CSS stylesheets, we made this adaptation very recently to help improve the script loading after an upgrade since many complained that fields and buttons did not behave coherently after an upgrade.

Looking back at the choice to target the latest Joomla was made since we wanted to avoid extreme complex behavior in the compiler. Further more to avoid having huge amount of duplication of code that will increase to package file from the already huge 7mb to nearly 5mb more for every targeted version.

That is what sparked the export and import of JCB packages so you can export your package from and older version of JCB and import it into a newer version and so target the newer Joomla wile at the same time still have the older version.

But having said all that, I think we can add a switch to the compiler script to behave dynamically based on the Joomla version the component is installed on. So let me add a fix to this issue and try and accommodate a little more backward compatibility in components build with JCB.

This may cause a whole new direction of addressing this version problem. My only objective is not to make it crazy complex in the compiler, and not allow JCB it self to become to big to manage, in relation to file size.

Okay the current implementation will always aim to target the latest stable version of Joomla. This means if you would like to compile for older version, you should also use an older version of JCB. We could build a table showing what version of JCB targets what version of Joomla, yet this has not yet been done, any of you can take a go at it if you like. But the current trend is to keep JCB in sync with the current stable Joomla release. Which will naturally mean adaption code implementation to be most applicable to the active version of Joomla. So addressing this issue of CSS stylesheets, we made this adaptation very recently to help improve the script loading after an upgrade since many complained that fields and buttons did not behave coherently after an upgrade. Looking back at the choice to target the latest Joomla was made since we wanted to avoid extreme complex behavior in the compiler. Further more to avoid having huge amount of duplication of code that will increase to package file from the already huge 7mb to nearly 5mb more for every targeted version. That is what sparked the export and import of JCB packages so you can export your package from and older version of JCB and import it into a newer version and so target the newer Joomla wile at the same time still have the older version. But having said all that, I think we can add a switch to the compiler script to behave dynamically based on the Joomla version the component is installed on. So let me add a fix to this issue and try and accommodate a little more backward compatibility in components build with JCB. This may cause a whole new direction of addressing this version problem. My only objective is not to make it crazy complex in the compiler, and not allow JCB it self to become to big to manage, in relation to file size.
kevincam3 commented 2018-01-14 23:05:18 +00:00 (Migrated from github.com)

Thanks, I think it will be a good idea because I have a lot of clients that aren't on the latest version of Joomla! and at a minimum it would be good to know what version of JCB will generate what compatibility with Joomla! but the ideal would be to be able to select the version of Joomla! you're targeting and let the compiler handle everything. I'm just wishful thinking and always appreciate the great work you do on this component can't tip my enough.

Thanks, I think it will be a good idea because I have a lot of clients that aren't on the latest version of Joomla! and at a minimum it would be good to know what version of JCB will generate what compatibility with Joomla! but the ideal would be to be able to select the version of Joomla! you're targeting and let the compiler handle everything. I'm just wishful thinking and always appreciate the great work you do on this component can't tip my enough.

Hey if you really think this is a great component why not give it a rating over on the Joomla index?

Hey if you really think this is a great component why not give it a rating over on the [Joomla index](https://extensions.joomla.org/extension/component-builder/)?

@mwweb I am wondering. Lets do this, I adapt the compiler to target major versions like:

  • Joomla 3
  • Joomla 4
  • Joomla 5

And in each version we try to insure the compiled component will work in that version no matter the minor versions in the major. So that means the component will work in J3.6 and J3.8 but not in J4 unless compiled for it.

Then I adapt the compiler concept to woker like the snippets. Meaning that I allow the developer/user to select which versions JCB should be able to target, just like you select the libraries you want to get snippets for. Then after installing that Joomla version target (config set and files) that JCB install will then be able to compile for any of the selected major versions.

Anyway that is what seems to be the most stable trusted scalable way forward. This will mean we try to in a major version try to compile as much as we can for it to be backward compatible withing its own minor versions. So when we get to J3.10 JCB components being compiled will still run in J3.6 and J3.10

I am not sure how much we should reach backward if we should try to go as far as J3.0 but we can look at this as issues come up and make the changes. I personal never target old versions of Joomla but have always just focused on the latest version. But I realize that may be a drawback in JCB if we do not try to implement the above.

@mwweb I am wondering. Lets do this, I adapt the compiler to target major versions like: - Joomla 3 - Joomla 4 - Joomla 5 And in each version we try to insure the compiled component will work in that version no matter the minor versions in the major. So that means the component will work in J3.6 and J3.8 but not in J4 unless compiled for it. Then I adapt the compiler concept to woker like the snippets. Meaning that I allow the developer/user to select which versions JCB should be able to target, just like you select the libraries you want to get snippets for. Then after installing that Joomla version target (config set and files) that JCB install will then be able to compile for any of the selected major versions. Anyway that is what seems to be the most stable trusted scalable way forward. This will mean we try to in a major version try to compile as much as we can for it to be backward compatible withing its own minor versions. So when we get to J3.10 JCB components being compiled will still run in J3.6 and J3.10 I am not sure how much we should reach backward if we should try to go as far as J3.0 but we can look at this as issues come up and make the changes. I personal never target old versions of Joomla but have always just focused on the latest version. But I realize that may be a drawback in JCB if we do not try to implement the above.
kevincam3 commented 2018-01-15 11:20:16 +00:00 (Migrated from github.com)

Sounds like a good idea to me.

Sounds like a good idea to me.

Yes it is always a good idea to give JCB a thumbs up on the Joomla index. Lol

Yes it is always a good idea to give JCB a thumbs up on the Joomla index. Lol
kevincam3 commented 2018-01-15 11:27:24 +00:00 (Migrated from github.com)

Review written and submitted. My pleasure.

Review written and submitted. My pleasure.

No it is my pleasure.... lol

No it is my pleasure.... lol
mwweb commented 2018-01-15 17:17:39 +00:00 (Migrated from github.com)

The only thing i might see wth targeting only major versions is there are sometimes big changes in a minor version. Remember back to when joomla 3.7 was released. You had to make some changes, since there was a change in joomla that broke layouts

The only thing i might see wth targeting only major versions is there are sometimes big changes in a minor version. Remember back to when joomla 3.7 was released. You had to make some changes, since there was a change in joomla that broke layouts
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#217
No description provided.