We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The new 3.4 uploaded by (uploader) field is blank on submissions sent from the front end.
When an authenticated user is logged in, the asset should get set to the current user's ID but that's not happening.
I would expect this with anonymous users, but it's happening for authenticated ones as well—I tried with a logged in, admin user.
More or less pulled from the Craft docs.
Setup an asset field (userPortfolio) and attach to a section (or user).
userPortfolio
If I set {author.username} on the Default Upload Location, it even knows the user's username and puts it in the right folder.
{author.username}
This recently came up on the Craft CMS stack exchange.
{% set entry = entry ?? create('craft\\elements\\Entry') %} <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} {{ actionInput('entries/save-entry') }} {{ hiddenInput('sectionId', '1') }} {{ hiddenInput('enabled', '1') }} <label for="title">Title</label> {{ input('text', 'title', entry.title, { id: 'title', class: entry.hasErrors('title') ? 'error', }) }} {{ _self.errorList(entry.getErrors('title')) }} {{ input('file', 'fields[userPortfolio][]', options={ multiple: true, }) }} <input type="submit" value="Publish"> </form>
The text was updated successfully, but these errors were encountered:
370a2e2
Thanks for pointing that out! Just fixed for the next release.
To get the fix early, change your craftcms/cms requirement in composer.json to:
craftcms/cms
"require": { "craftcms/cms": "dev-develop as 3.4.29.1", "...": "..." }
Then run composer update.
composer update
Sorry, something went wrong.
Craft 3.4.30 is out now with that fix.
Fixed #6456 again
5d2d2fd
Change from 370a2e2 got lost in merge commit 40b7868
That bug made its way back into Craft 3.5, and is now fixed once again for 3.5.8.
No branches or pull requests
Description
The new 3.4 uploaded by (uploader) field is blank on submissions sent from the front end.
When an authenticated user is logged in, the asset should get set to the current user's ID but that's not happening.
Steps to reproduce
I would expect this with anonymous users, but it's happening for authenticated ones as well—I tried with a logged in, admin user.
Additional info
Sample Code
More or less pulled from the Craft docs.
Setup an asset field (
userPortfolio
) and attach to a section (or user).If I set
{author.username}
on the Default Upload Location, it even knows the user's username and puts it in the right folder.This recently came up on the Craft CMS stack exchange.
The text was updated successfully, but these errors were encountered: