Unable to install and test on J4 #1064

Open
opened 2024-02-28 19:31:38 +00:00 by znorm87 · 10 comments

Steps to reproduce the issue

Complie component for J4/5
Fresh Install on a Joomla 4 website

Expected result

Install Component

Actual result

JInstaller: :Install: File does not exist [ROOT][TMP]/install_65df843362f79/site/layouts
Component Install: Failed to copy site files.

Error installing component

System information (as much as possible)

OS Name & Version: Linux g
MySql Version: 5.7.23-23
Apache Version:
PHP Version: 8.2.16
Joomla Version: 3.10.12
JCB Version: 3.1.42
Browser: Firefox

Additional comments

### Steps to reproduce the issue Complie component for J4/5 Fresh Install on a Joomla 4 website ### Expected result Install Component ### Actual result > JInstaller: :Install: File does not exist [ROOT][TMP]/install_65df843362f79/site/layouts > Component Install: Failed to copy site files. > > Error installing component ### System information (as much as possible) OS Name & Version: Linux g MySql Version: 5.7.23-23 Apache Version: PHP Version: 8.2.16 Joomla Version: 3.10.12 JCB Version: 3.1.42 Browser: Firefox ### Additional comments
Author

The layouts folder is not being added to sites. When I extract the compiled zip in the tmp folder and add the layouts the component installs and works as expected on J4. :)

However on the backend the language files are not coming through. I do not have translations of my component.

The layouts folder is not being added to sites. When I extract the compiled zip in the tmp folder and add the layouts the component installs and works as expected on J4. :) However on the backend the language files are not coming through. I do not have translations of my component.
Owner

Bump your PHP on Joomla 3.10 to PHP 8.0 instead, and try again.

Joomla 3.10 (file and folder) classes are not PHP 8.1+ ready far as I know.

Bump your PHP on Joomla 3.10 to PHP 8.0 instead, and try again. Joomla 3.10 (file and folder) classes are not PHP 8.1+ ready far as I know.
Author

Thank you, my result is the same, but I did discover a work-around.

Any time a Decription for a field included a line break there was an error in the language file at that line. By removing the line breaks it resolved the issues with the language files. The only item I can't resolve on my own is the lack of the layouts folder in the J4.

I do not have a layout that I have incourperated into my component.

Thank you, my result is the same, but I did discover a work-around. Any time a Decription for a field included a line break there was an error in the language file at that line. By removing the line breaks it resolved the issues with the language files. The only item I can't resolve on my own is the lack of the layouts folder in the J4. I do not have a layout that I have incourperated into my component.
Owner

I see... so is the hard coded "site" layout folder the issue?

For the line-breaks go to the component view the details tab (there is a button for this):
image

I see... so is the [hard coded](https://git.vdm.dev/joomla-beta/com-componentbuilder/src/branch/master/admin/compiler/joomla_4/component.xml#L54) "site" layout folder the issue? For the line-breaks go to the component view the details tab (there is a button for this): ![image](https://git.vdm.dev/attachments/ae05cc77-ddbf-4447-82b8-43beada6b88f)
5.6 KiB

Hi,

I checked the contents of the J4 zip. I do not use layouts.
I confirm. The J4 zip is missing the layouts folder for the site part. They are there for the admin part.

The J3 zip does have the layouts folder for the site part as well as for the admin part.

I have to check still on the removal of Linebreaks.

Hi, I checked the contents of the J4 zip. I do not use layouts. I confirm. The J4 zip is missing the layouts folder for the site part. They are there for the admin part. The J3 zip does have the layouts folder for the site part as well as for the admin part. I have to check still on the removal of Linebreaks.

This trick with Removing Break lines does not work for me.
Installed 3.2.0-Beta1 and the generated j4/5 zip still has no layouts folder or files in the site part.

This trick with Removing Break lines does not work for me. Installed 3.2.0-Beta1 and the generated j4/5 zip still has no layouts folder or files in the site part.
Owner

JCB will only add layouts to the site view if you added layout to your site views. So have you added any layouts?

Removing Break lines

This is related to the language strings in the language file... have you checked the language file?

JCB will only add layouts to the site view if you added layout to your site views. So have you added any layouts? > Removing Break lines This is related to the language strings in the language file... have you checked the language file?

Ok, that's understandable.
I have no layouts.

The error message jml5.0.3 gives is:
JInstaller: :Install: File does not exist [ROOT]\tmp\install_65e61b9b08842\site\layouts
Component Install: Failed to copy site files.

All folders are writable and also the configuration.php

So now I removed any layout reference in the XML file, and it installed ok now.

So I'm going to double check. If this layout reference is again there in the build as I have no layouts.

Ok, that's understandable. I have no layouts. The error message jml5.0.3 gives is: JInstaller: :Install: File does not exist [ROOT]\tmp\install_65e61b9b08842\site\layouts Component Install: Failed to copy site files. All folders are writable and also the configuration.php So now I removed any layout reference in the XML file, and it installed ok now. So I'm going to double check. If this layout reference is again there in the build as I have no layouts.
Author

The language line issue is resolved for me and I have been successful to launch my j4 component to a testing domain and work out the differences between j3 and j4. I also do not use the layouts. I just added an empty folder to \site and re-zipped the file.

The language line issue is resolved for me and I have been successful to launch my j4 component to a testing domain and work out the differences between j3 and j4. I also do not use the layouts. I just added an empty folder to \site and re-zipped the file.
Owner

So yesterday our in house testing Team found that they could not get a few of our own components to work, it kept missing classes. We then discovered that the installer of Joomla times-out and the complete package does not install, even thought it says that it did. So they asked me what tweaks to PHP I am using on my development system. So here is some of my PHP.ini tweaks:

; Resource Limits and File Uploads
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 60
max_input_vars = 5000
max_input_time = 60
memory_limit = 256M

If you add these, and install JCB again.... and also on the system where your planning to install you component... I think it will resolve your problem. Yes, you could remove this in most cases after the install, but in your development system it might be best to keep it on.

But for large extensions like those that JCB can build making these changes seems necessary, at least on the initial install.

So yesterday our in house testing Team found that they could not get a few of our own components to work, it kept missing classes. We then discovered that the installer of Joomla times-out and the complete package does not install, even thought it says that it did. So they asked me what tweaks to PHP I am using on my development system. So here is some of my PHP.ini tweaks: ``` ; Resource Limits and File Uploads upload_max_filesize = 128M post_max_size = 128M max_execution_time = 60 max_input_vars = 5000 max_input_time = 60 memory_limit = 256M ``` If you add these, and install JCB again.... and also on the system where your planning to install you component... I think it will resolve your problem. Yes, you could remove this in most cases after the install, but in your development system it might be best to keep it on. But for large extensions like those that JCB can build making these changes seems necessary, at least on the initial install.
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#1064
No description provided.