Adding File Picker content crashes page
Permalink Browser Info Environment
Hi. I purchased your add-on, which installed without issue, earlier this week. When I add content to a block, everything seems to be fine during the process, but when I click the "Add" button to save/submit the File Picker window, it looks like it works, but nothing shows up in the target block, and if I publish the page, then it looks like it breaks permanently. From that point on, navigating to the page results in the following output:
An unexpected error occurred.
The use statement with non-compound name 'Page' has no effect
with a "Back to home" button. How do I resolve this issue? Thanks.
An unexpected error occurred.
The use statement with non-compound name 'Page' has no effect
with a "Back to home" button. How do I resolve this issue? Thanks.
Type: | Pre-Sale |
---|---|
Status: | In Progress |
Thanks for your quick attention, sir.
# concrete5 Version
Core Version - 8.2.0
Version Installed - 8.2.0
Database Version - 20170711151953
# concrete5 Packages
File Picker (2.0)
# concrete5 Version
Core Version - 8.2.0
Version Installed - 8.2.0
Database Version - 20170711151953
# concrete5 Packages
File Picker (2.0)
I found the use-statements that are most likely causing the error. Are you proficient with php? Then you could remove the use statements to fix the bug temporarily. I also want to know if this solves the problem.
All you have to do is open the 2 template files from the block and remove the following line from those files at the top of those files:
The template files are:
- /packages/file_picker/blocks/file_picker/templates/table/view.php
- /packages/file_picker/blocks/file_picker/view.php
So all you have to do is remove those lines. You can also comment them out by adding two forward slashes in front of the statements, like this:
Let me know if this solves your problem. Then I will release a new version with the bug fix.
All you have to do is open the 2 template files from the block and remove the following line from those files at the top of those files:
use \Page;
The template files are:
- /packages/file_picker/blocks/file_picker/templates/table/view.php
- /packages/file_picker/blocks/file_picker/view.php
So all you have to do is remove those lines. You can also comment them out by adding two forward slashes in front of the statements, like this:
//use \Page;
Let me know if this solves your problem. Then I will release a new version with the bug fix.
That did the trick!
Thanks much for your time and effort!
Thanks much for your time and effort!
I'm sorry to hear you are experiencing problems with one of my add-ons. Could you first tell me what version of Concrete you are using and what version of the add-on?
I think I know what is going on because I've seen errors like this before when working with php. There's probably going to be a use-statement like this in one of the files:
use \Page;
Because Page is an alias to \Concrete\Core\Page\Page using 'Page' with a backslash in front of it will sometimes give errors like this with certain server server or php configurations I noticed, even though this is the proper way to write a use-statement. I haven't had this error myself so it might be your configuration.
But if you supply me with the versions used I'll fix the problem and upload a new version.