Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error from Toolbox\Blueprints\BlueprintForm->doLoad() #2782

Closed
OleVik opened this issue Jan 3, 2020 · 6 comments
Closed

Improve error from Toolbox\Blueprints\BlueprintForm->doLoad() #2782

OleVik opened this issue Jan 3, 2020 · 6 comments
Assignees

Comments

@OleVik
Copy link
Contributor

OleVik commented Jan 3, 2020

With the newer, explicit erroring out in Toolbox, which was implemented from static analysis, the error - \InvalidArgumentException(__METHOD__ . '(): Parameter #1 does not contain array of filenames'); - is rather unspecific.

It would be beneficial to include the $filename to tell the developer/user what caused this error specifically. As shown in a recent error-report, this can be confusing and obscure.

Tagging @mahagr by request. Feel free to move to Toolbox-repo if desirable, just thought it more pertinent and potentially time-sensitive for Core if it is a pervasive error.

@SteveBaumann
Copy link

I receive this error when clicking "Add" from the Plugins page in Dashboard. The Plugins page itself renders properly, listing all the installed plugins, but the page that should show all available plugins delivers the Crikey! page, stating there are no filenames in the array.
image

@SteveBaumann
Copy link

SteveBaumann commented Jan 19, 2020

To replicate the bug, and with the help of Ole & Ricardo, I tried a test, using both PHP 7.2.19 and 7.3.7 (the 2 versions available on my account at my web hosting provider).

I created a new directory; downloaded a copy of the 1.7 rc3 package that's available from the getgrav.org website, and FTP'd it to the new directory.

I created an admin account, went to the Plugins page, and upon clicking the Add button, I get the Crikey! page (as above), even with that bare setup, with nothing extra added at all.

After deleting everything from that directory to empty, I FTP'd a copy of the 1.7 repo, current as of this morning, into that directory, and used Terminal to install the dependencies, 2 user accounts, and the Admin Plugin. I logged in, clicked into the Plugins page, and clicked the Add button, and the list of available plugins displays normally.

So it stands to reason, that there is something in the full initial rc3 package, that does not exist in the repo, that is causing a conflict, at least with PHP 7.2.19 and 7.3.7 - my hosting provider has not yet made PHP 7.4 available to use, for me to be able to test it.

@rhukster
Copy link
Member

@SteveBaumann did you not see the message above the @mahagr fixed this 2 weeks ago in toolbox? You can just update the composer.lock file from the commit and do a composer update to get the fixed version of toolbox.

@SteveBaumann
Copy link

Hi Andy, I already did that, and it didn't fix anything. Ole and I have been going over it. I actually tried overwriting composer.lock file with the current version from the repo, with no improvement. Even grabbed the entire current 1.7 repo and uploaded it over the base rc3 setup and still get the same error.
Only with a bare install of the repo from Command Line does it work for me without errors.

@OleVik
Copy link
Contributor Author

OleVik commented Jan 19, 2020

I've tested the current 1.7-branch with Admin and Flex Objects, and I can't replicate the problem. Though I do think RC.4 is ripe for release, there's quite a few people on RC.3 who have reported this.

@mahagr
Copy link
Member

mahagr commented Jan 20, 2020

FYI: You cannot get the error with the latest Toolbox because I removed the error message. So if you're still getting it, you must be doing something wrong. Basically you need to run composer install with the latest version of the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants