Facade\Ignition\Exceptions\ViewException htmlspecialchars() expects parameter 1 to be string, array given (View: /home/vagrant/code/vendor/backpack/crud/src/resources/views/crud/fields/page_or_link.blade.php)
brynnb opened this issue ยท 7 comments
Bug report
What I did:
Installed fresh backpack per instructions and installed optional packages per instructions. Opened the new menu section and clicked "Add new menu item"
What I expected to happen:
To render the "add menu item" page
What happened:
Facade\Ignition\Exceptions\ViewException
htmlspecialchars() expects parameter 1 to be string, array given (View: /home/vagrant/code/vendor/backpack/crud/src/resources/views/crud/fields/page_or_link.blade.php)
What I've already tried to fix it:
8b4e9b9#diff-4c0570cf6e95730105a00ba8cf5abd7b
Reverting this change fixed it
Backpack, Laravel, PHP, DB version:
4, 6, PHP 7.3.9-1, 14.14
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication mediums:
- Bug Reports, Feature Requests - Github Issues (here);
- Quick help (How do I do X) - Gitter Chatroom;
- Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the
backpack-for-laravel
tag;
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
--
Justin Case
The Backpack Robot
Hi @brynnb ,
That's weird. That change was specifically so it would work ๐ It worked fine in my tests, so there should be a difference between my setup and yours. Do you have page_or_link.blade.php
published by any chance? In your ```resources/views/vendor/backpack/crud/fields/````? If so, please copy-paste it here. Removing it should fix this for you (without the revert).
Cheers!
The only page_or_link.blade is the one in vendor/backpack/crud/src/resources/views/fields/page_or_link.blade.php
Not sure what the difference is between our environments!
Oh I mean difference between what we installed and how (using composer), not our env. That shouldn't matter.
Hmmm... ok then... what does php artisan backpack:version
output?
Woops, ignore previous comment. Was running in the wrong project. Here's the output:
PHP VERSION:
PHP 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 12:54:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.9-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
LARAVEL VERSION:
laravel/framework v6.0.4 The Laravel Framework.
BACKPACK VERSION:
backpack/backupmanager 2.0.0 Admin interface for managing backups in Backpack, on Laravel 5.2+
backpack/crud 4.0.5 Quickly build an admin interfaces using Laravel 6, CoreUI, Boostrap 4 and jQuery.
backpack/generators 2.0.4 Generate files for laravel projects
backpack/logmanager 3.0.0 An interface to preview, download and delete Laravel log files.
backpack/pagemanager 2.0.1 Create admin panels for presentation websites on Laravel, using page templates and Backpack\CRUD.
backpack/permissionmanager 5.0.1 Users and permissions management interface for Laravel 5 using Backpack CRUD.
backpack/settings 3.0.0 Application settings interface for Laravel 5 using Backpack CRUD.
AHA! You're running CRUD 4.0.5 and the fix was pushed in 4.0.6 :-)
A composer update
should do it for you ๐ Let me know.
Good catch, that fixed it. Thanks! Hopefully this is useful for anyone else who might run into this problem.