If you begin the Download path with a leading slash it will start pathing from your webroot. If you do not provide a leading slash it will path from your Joomla root. Example as follows.Question 1: When a leading slash is added, where is the new location of the download file?
It has no barring on the download file. All it does is rename the file before serving the download to the user. Example as follows.Question 2: Additionally, how is the “Filename” field of the Package tab (see the attached image) used to further specify the download file?
Please Log in or Create an account to join the conversation.
Enable debug mode and maximum error reporting then retry and provide the callstack for the error. Attempted to replicate in my test environments, but am not seeing any errors in my tests.Additional questions associated with the "Type" setting when setting-up packages.
None of my downloads are associated with Joomla, so I'm using the "Custom" type when setting up packages.
I'm also specifying both a custom Type and a custom Sub-Type.
First issue, I'm having problems displaying the files of these Types and Sub-Types via a menu item.
So, for example, if I have two download files, each with the same Type but different Sub-Types, and then I set up a menu item to show both of these files by selecting the Type and then also selecting the two Sub-Types simultaneously in the CB Package Builder Plugin menu item, I receive the error below.
"0 in_array(): Argument #2 ($haystack) must be of type array, null given"
Essentially it looks like I can't select two Sub-Types simultaneously when displaying downloads via a menu item. I believe this is also the case if I attempt to select multiple Types simultaneously as well.
JHM 2023-01-11: I've got 2 package downloads. Both with a custom Type of "Biotech", and one with Sub-Type "CRISPR", the other with Sub-Type "DrugDev". I'm attempting to display both of these via a menu item using the CB Package Builder plugin and the selection of the "Biotech" Type and both Sub-Types (see attached image MultiSubTypesSelectedInMenuDisplay.jpg). The callstack error is attached as image CallStackErrorWithMenuMultiSubTypes.jpg.
I assume you mean the CMS selector? Within CB > Package Builder > Parameters > CMS create a custom CMS option there. Example as follows.Second issue, when I'm able to get the menu item to show the list of downloads (by specifying the same Type and Sub-Type), and then I click on one of the download files to get to the details page, the details page defaults to showing the Joomla compatible versions, even though I've attempted to disable any indication of Joomla version. It almost looks like I'd need to design a custom details display template to get rid of the Joomla version indication.
Value: custom
Label: Custom
Now assign all your packages to it. Next within CB > Package Builder > Parameters > Packages and CB > Package Builder > Parameters > Presets set "CMS" to "Disable" and "Default CMS" to "Custom". That should deal with suppressing the display of the CMS selector. Additionally within CB > Package Builder > Parameters > Global I recommend setting "Bundle Type" to "ZIP" so it never can package a Joomla installer.
JHM 2023-01-11: Thank you. Yes, your notes above fixed the details display issue. The key was creating the custom CMS option.
There is a bug with the type icons not showing custom types though and defaulting to Document. Am fixing that bug as we speak. CB Package Builder is of course designed and meant for building Joomla packages, but it can certainly be much more than that and will make whatever changes are necessary to fit outside of that scope so please do let me know what issues you run into in that regard.
JHM 2023-01-11: Yes, I fully understand that the CB Package Builder was designed for Joomla downloads. But as long as I can navigate around the Joomla CMS specification issues, I think this will work perfectly with my custom zip file downloads as well. Thanks for your help.
Please Log in or Create an account to join the conversation.
A new CB Package Builder build release is now available. I've added parameters to suppress Type and Compatibility display for Packages and Presets. Simply toggle "Type" and "Compatibility" to "Disable" within CB > Package Builder > Parameters > Packages and CB > Package Builder > Parameters > Presets and they'll now be hidden. Have also fixed several PHP 8.1 deprecation notices, which maybe what your menu item was showing.
If you begin the Download path with a leading slash it will start pathing from your webroot. If you do not provide a leading slash it will path from your Joomla root. Example as follows.Question 1: When a leading slash is added, where is the new location of the download file?
Web Root
Download: /files/file_01.zip
Result: /var/www/httpdocs/files/file_01.zip
Joomla Root
Download: files/file_01.zip
Result: /var/www/httpdocs/JOOMLA_SITE/files/file_01.zip
You can use the "Root" parameter in CB Package Builder > Parameters > Downloads to specify the Joomla Root as well. Example as follows.
Root: /images
Result: /var/www/httpdocs/JOOMLA_SITE/images/files/file_01.zip
This parameter can be used to back out of Joomla Root as well. Example as follows.
Root: ../downloads
Result: /var/www/httpdocs/downloads/images/files/file_01.zip
It's to give complete control over where your files sit on your server.
JHM 2023-01-11: Ah, yes, I understand now. And complete control over where the files are on the server is a very good thing.It has no barring on the download file. All it does is rename the file before serving the download to the user. Example as follows.Question 2: Additionally, how is the “Filename” field of the Package tab (see the attached image) used to further specify the download file?
Download: /files/file_01.zip
Filename: file_01_renamed
Result: file_01_renamed.zip
This allows the file stored in the system to be named differently from the actual downloaded file.
JHM 2023-01-11: Got it. Thank you.
Please Log in or Create an account to join the conversation.
A new CB Package Builder build release is now available. I've added parameters to suppress Type and Compatibility display for Packages and Presets. Simply toggle "Type" and "Compatibility" to "Disable" within CB > Package Builder > Parameters > Packages and CB > Package Builder > Parameters > Presets and they'll now be hidden. Have also fixed several PHP 8.1 deprecation notices, which maybe what your menu item was showing.
JHM 2023-01-11: Awesome, this further improves the details display of the packages.If you begin the Download path with a leading slash it will start pathing from your webroot. If you do not provide a leading slash it will path from your Joomla root. Example as follows.Question 1: When a leading slash is added, where is the new location of the download file?
Web Root
Download: /files/file_01.zip
Result: /var/www/httpdocs/files/file_01.zip
Joomla Root
Download: files/file_01.zip
Result: /var/www/httpdocs/JOOMLA_SITE/files/file_01.zip
You can use the "Root" parameter in CB Package Builder > Parameters > Downloads to specify the Joomla Root as well. Example as follows.
Root: /images
Result: /var/www/httpdocs/JOOMLA_SITE/images/files/file_01.zip
This parameter can be used to back out of Joomla Root as well. Example as follows.
Root: ../downloads
Result: /var/www/httpdocs/downloads/images/files/file_01.zip
It's to give complete control over where your files sit on your server.
JHM 2023-01-11: Ah, yes, I understand now. And complete control over where the files are on the server is a very good thing.It has no barring on the download file. All it does is rename the file before serving the download to the user. Example as follows.Question 2: Additionally, how is the “Filename” field of the Package tab (see the attached image) used to further specify the download file?
Download: /files/file_01.zip
Filename: file_01_renamed
Result: file_01_renamed.zip
This allows the file stored in the system to be named differently from the actual downloaded file.
JHM 2023-01-11: Got it. Thank you.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please update to now latest build release. Believe your error should be fixed now. Appears to have been caused by the bundled subtype check.
JHM 2023-01-11: Yep, that fixed it. Thanks
Please Log in or Create an account to join the conversation.