-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Undefined property: stdClass::$image in 1.8.2 #1454
Comments
Don't do this, pagemedia field already uploads to the page folder. File field is intended to be used in other non-page blueprints. |
So, what would the correct way be to achieve this, blueprint wise? |
Same here. Since the update to Grav 1.4.5 and Admin 1.8.2, I cannot upload images, resulting in the same error @superDuperCyberTechno reported. My blueprint excerpt is as follows:
This has worked thus far without issue. The update broke it. If there are breaking changes, it would be advantageous to know about them before the update. If there are best practices, it would be great to know about them at all instead of just getting a response like
without any pointers as to why. I created the blueprint according to the documentation at the time and it worked. Either this is a bug or a breaking, non-documented change. Update: Downgrading to Admin 1.8.1 resolved this for me as well. This reinforces my impression that this is most likely a bug introduced in 1.8.2. Additionally, I have found out that when deleting one post with this setup, all images in the |
We didn’t realize this was a breaking change because this field really is not intended to replace pagemedia picker. Now we have a couple of reports of people using file field in conjunction with pagemedia picker, we’ll investigate and find a solution. Sorry about this! |
FYI the recommended approach is to use the standard pagemedia field to upload images into a page and a filepicker to select them for specific header variables |
This recommended approach strikes me as counter-intuitive. Uploading and assigning a file/image to a field should be one action, not two. Teaching users to do it in two steps would be frustrating and should not be necessary. In any case, thanks for looking into it. |
Issue can be fixed by changing line 722 in adminbasecontroller.php to have
|
This issue has been fixed in Admin 1.8.3 |
I get the error
Undefined property: stdClass::$image
when uploading an image to a page template. The error handler specifically references line 722 in adminbasecontroller.php. The image specific blueprint is here:The image gets uploaded regardless of error, but the header is not updated...
Rolling back to 1.8.1 fixed it for now.
The text was updated successfully, but these errors were encountered: