?
avatar toivo
toivo
8 Dec 2020

Steps to reproduce the issue

Go to Contents - Media - Options.
Click Save.

Expected result

The current option fields saved.

Actual result

0 Joomla\CMS\Form\Field\TextField::validate() rule filePath missing.

System information (as much as possible)

Joomla 4 Beta6-dev of 8 December
Windows 10, Wampserver 3.2.4
Apache 2.4.43a, MySQL 8.0.20, PHP 7.4.13

Additional comments

Stack Trace
[08-Dec-2020 10:49:08 UTC] PHP Warning: include(): Failed opening 'C:\www\joomla4\libraries\vendor\composer/../../../libraries/src/Form/Rule/FilePathRule.php' for inclusion (include_path='.;C:\php\pear') in C:\www\joomla4\libraries\vendor\composer\ClassLoader.php on line 444
[08-Dec-2020 10:49:08 UTC] PHP Stack trace:
[08-Dec-2020 10:49:08 UTC] PHP 1. {main}() C:\www\joomla4\administrator\index.php:0
[08-Dec-2020 10:49:08 UTC] PHP 2. require_once() C:\www\joomla4\administrator\index.php:36
[08-Dec-2020 10:49:08 UTC] PHP 3. Joomla\CMS\Application\AdministratorApplication->execute() C:\www\joomla4\administrator\includes\app.php:63
[08-Dec-2020 10:49:08 UTC] PHP 4. Joomla\CMS\Application\AdministratorApplication->doExecute() C:\www\joomla4\libraries\src\Application\CMSApplication.php:233
[08-Dec-2020 10:49:08 UTC] PHP 5. Joomla\CMS\Application\AdministratorApplication->dispatch() C:\www\joomla4\libraries\src\Application\AdministratorApplication.php:185
[08-Dec-2020 10:49:08 UTC] PHP 6. Joomla\CMS\Component\ComponentHelper::renderComponent() C:\www\joomla4\libraries\src\Application\AdministratorApplication.php:142
[08-Dec-2020 10:49:08 UTC] PHP 7. Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() C:\www\joomla4\libraries\src\Component\ComponentHelper.php:389
[08-Dec-2020 10:49:08 UTC] PHP 8. Joomla\Component\Config\Administrator\Controller\ComponentController->execute() C:\www\joomla4\libraries\src\Dispatcher\ComponentDispatcher.php:146
[08-Dec-2020 10:49:08 UTC] PHP 9. Joomla\Component\Config\Administrator\Controller\ComponentController->save() C:\www\joomla4\libraries\src\MVC\Controller\BaseController.php:729
[08-Dec-2020 10:49:08 UTC] PHP 10. Joomla\Component\Config\Administrator\Model\ComponentModel->validate() C:\www\joomla4\administrator\components\com_config\src\Controller\ComponentController.php:107
[08-Dec-2020 10:49:08 UTC] PHP 11. Joomla\CMS\Form\Form->validate() C:\www\joomla4\libraries\src\MVC\Model\FormModel.php:211
[08-Dec-2020 10:49:08 UTC] PHP 12. Joomla\CMS\Form\Field\TextField->validate() C:\www\joomla4\libraries\src\Form\Form.php:1229
[08-Dec-2020 10:49:08 UTC] PHP 13. Joomla\CMS\Form\FormHelper::loadRuleType() C:\www\joomla4\libraries\src\Form\FormField.php:1210
[08-Dec-2020 10:49:08 UTC] PHP 14. Joomla\CMS\Form\FormHelper::loadType() C:\www\joomla4\libraries\src\Form\FormHelper.php:90
[08-Dec-2020 10:49:08 UTC] PHP 15. Joomla\CMS\Form\FormHelper::loadClass() C:\www\joomla4\libraries\src\Form\FormHelper.php:134
[08-Dec-2020 10:49:08 UTC] PHP 16. class_exists() C:\www\joomla4\libraries\src\Form\FormHelper.php:225
[08-Dec-2020 10:49:08 UTC] PHP 17. spl_autoload_call() C:\www\joomla4\libraries\src\Form\FormHelper.php:225
[08-Dec-2020 10:49:08 UTC] PHP 18. Joomla\CMS\Autoload\ClassLoader->loadClass() C:\www\joomla4\libraries\src\Form\FormHelper.php:225
[08-Dec-2020 10:49:08 UTC] PHP 19. Composer\Autoload\ClassLoader->loadClass() C:\www\joomla4\libraries\src\Autoload\ClassLoader.php:56
[08-Dec-2020 10:49:08 UTC] PHP 20. Composer\Autoload\includeFile() C:\www\joomla4\libraries\vendor\composer\ClassLoader.php:322

avatar toivo toivo - open - 8 Dec 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Dec 2020
avatar N6REJ
N6REJ - comment - 8 Dec 2020

@toivo I'm beginning to suspect you've got something wrong with your wamp install.
please upgrade your apache to a non-alpha version and you might consider upgrading your php to 7.4.4 as well.
I tried in both php 8 and 7.4.4 and could not replicate your issue.
Did you run composer install & npm i after pulling 4.0-dev?

avatar toivo
toivo - comment - 8 Dec 2020

@N6REJ I did not realise that 2.4.43a is alpha, but I will update it asap. I have been using PHP 7.4.13 which is the current stable release.
I download either the latest update or the full version of Beta6-dev from Nightly Builds. I do not run any Composer or npm scripts.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar toivo
toivo - comment - 8 Dec 2020

@N6REJ Just installed Beta6-dev Full of 8 December from scratch, using Apache 2.4.46a, MySQL 8.0.22, PHP 7.4.13. Repeated the test Content - Media - Options - Save and this time no warnings or errors were reported.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar N6REJ
N6REJ - comment - 8 Dec 2020

@toivo wonderful. Can we close this then?

avatar toivo
toivo - comment - 8 Dec 2020

@N6REJ Yes, please.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar richard67 richard67 - change - 8 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-08 19:51:36
Closed_By richard67
avatar richard67 richard67 - close - 8 Dec 2020
avatar richard67
richard67 - comment - 8 Dec 2020

Closing as requested above.

avatar SharkyKZ
SharkyKZ - comment - 8 Dec 2020

This is not fixed yet.

avatar richard67
richard67 - comment - 8 Dec 2020

So I misunderstood? Reopening.

avatar richard67 richard67 - change - 8 Dec 2020
Status Closed New
Closed_Date 2020-12-08 19:51:36
Closed_By richard67
avatar richard67 richard67 - reopen - 8 Dec 2020
avatar N6REJ
N6REJ - comment - 9 Dec 2020

@SharkyKZ you can replicate this error? the rp stated it was an issue with his config not J!

avatar toivo
toivo - comment - 9 Dec 2020

@N6REJ @SharkyKZ sorry, I only stated that after Beta6-dev Full of 8 December was installed from scratch the error did not occur. A closer look at the error message reveals the following:

  1. J4 tried to open 'C:\www\joomla4\libraries\vendor\composer/../../../libraries/src/Form/Rule/FilePathRule.php' for inclusion but failed because the folder libraries/src/Form/Rule did not contain a file called FilePathRule.php.

  2. When Beta6-dev was installed from scratch the Rule folder still did not have the file FilePathRule.php.

  3. The current Beta6-dev refers to the file FilePathRule.php in the following scripts:
    administrator/components/com_admin/script.php
    libraries/vendor/composer/autoload_classmap.php
    libraries/vendor/composer/autoload_static.php

  4. My Beta 6 site had been created earlier and it was updated a couple of times before the first test. Then it had some code that tried to include the file FilePathRule.php. That particular code is not present or not run in the Full version of Beta6-dev installed later, apart from the three references to the non-existent FilePathRule.php in the files listed in point 3 above.

Over to you guys.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar N6REJ
N6REJ - comment - 9 Dec 2020

@toivo ok, this is really weird.. I wonder whats going on. I do a full search of 4.0-dev and there' only a single reference which is the one to delete the file if it exists.
image

avatar toivo
toivo - comment - 9 Dec 2020

@N6REJ Today's Beta6-dev Full from Nightly Builds has three references to FilePathRule.php. The 4.0 Nightly Build may somehow be out of sync with the 4.0-dev instance you are accessing.

filepathrule-php

avatar brianteeman
brianteeman - comment - 9 Dec 2020
avatar brianteeman
brianteeman - comment - 9 Dec 2020

Or it should have been removed and hasn't been because @wilsonge added it to the list of files to remove. ac099b8

avatar toivo
toivo - comment - 9 Dec 2020

@N6REJ @brianteeman -also found the actual file libraries/src/Form/Rule/FilePathRule.php from this morning's Beta6-dev Full version.

Just tested my updated J4 Beta6-dev site and it still bugs out after Contents - Media - Options - Save with the message
An error has occurred. 0 Joomla\CMS\Form\Field\TextField::validate() rule filePath missing.

avatar N6REJ
N6REJ - comment - 9 Dec 2020

@brianteeman ok, thats weird.. I'll do a hard reset and get back to you.

avatar N6REJ
N6REJ - comment - 9 Dec 2020

@brianteeman yep, it's there... very strange that I had to reset things.
image
it's being pulled in via composer
image
Maybe the maintainers need to flip a switch?.. @HLeithner @richard67 @infograf768

avatar toivo
toivo - comment - 9 Dec 2020

@N6REJ @brianteeman
Removed the test site, dropped the database, installed a new site from today's Full Beta6-dev version, went to Contents - Media - Options, set 'Path to Images Folder' to images/toivo, clicked Save and did not get any errors.

Updated the same test site with today's Beta6-dev update though System - Joomla - Upload & Update, went to Contents - Media - Options, set 'Path to Images Folder' to images/testing, clicked Save and got the error
An error has occurred. 0 Joomla\CMS\Form\Field\TextField::validate() rule filePath missing.

avatar brianteeman
brianteeman - comment - 9 Dec 2020

@toivo that is exactly what I expect because o update the file was removed. Pretty sure that @wilsonge made a mistake when he added the file to the list of files to be removed

avatar toivo
toivo - comment - 9 Dec 2020

@brianteeman ok, thanks. So @wilsonge should be able to fix it or someone can create a PR, I presume.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar wilsonge
wilsonge - comment - 9 Dec 2020

Yup. It's probably just due to the differences between 3.x and 4.x because I'm behind on merge conflicts. I'll try and do a regeneration later this week/early next week

avatar toivo
toivo - comment - 9 Dec 2020

@wilsonge thank you!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31613.

avatar wilsonge wilsonge - change - 14 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-14 17:08:04
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Dec 2020
avatar wilsonge
wilsonge - comment - 14 Dec 2020

Fixed

avatar toivo
toivo - comment - 14 Dec 2020

@wilsonge thank you

Add a Comment

Login with GitHub to post a comment