Skip to main content

Unanswered Questions

1,428 questions with no upvoted or accepted answers
9 votes
0 answers
1k views

How do I upload images programmatically?

I'm working on a plugin that creates auto crops of a selected image, but I am unsure of the proper steps to create and upload an image programatically. I am hoping that Local asset sources and Remote ...
8 votes
0 answers
339 views

Solspace Freeform Upload file dynamic location and duplicate file avoidance

Using Freeform for forms which have multiple file upload fields. Is it possible to have a unique asset directory for each submission? For example: uploads/maindirectory/submission.id/ I'm trying to ...
5 votes
0 answers
326 views

How does "Use this field's values as search keywords" work with a Matrix field?

I'm fine-tuning a search results page and have noticed that "Use this field's values as search keywords" is included both on the matrix field itself, and within each block type / sub-field. I ...
5 votes
0 answers
228 views

Eagerloading Matrix fields resulting in empty array

I'm trying to eager-load a Matrix field with it's blocktype and related field types. For some reason the _eagerLoadedBlockTypeElements are empty arrays. If I get rid of the with clause on ...
5 votes
0 answers
441 views

How to load components into Craft 3 plugin?

what is the correct way to load third-party components into Craft 3 plugin I'm developing? I tried adding $this->setComponents([ 'authClientCollection' => [ 'class' => '\yii\...
4 votes
0 answers
820 views

How to Upload Multiple Assets Using Frontend Form

I'm trying to create a more interactive experience to upload moultiple images on a frontend entry form. Things I have done: I have implemented the code here: https://docs.craftcms.com/v3/dev/examples/...
4 votes
0 answers
1k views

Multiple Entry Types on GraphQL Fragment

So I am building out a Gatsby Site, which is using Craft in Headless mode as it's content source. In one Section, I have three entry types. Currently they have identical fields, but may diverge in the ...
4 votes
0 answers
193 views

Testing / Fixtures: setup Entries in Structure

Background: I have experience with vanilla PHPUnit testing of projects, but this the first attempt at both testing a Craft project and using Codeception for testing. Case: I have a section of type ...
4 votes
0 answers
478 views

User Event before Login - check if user has password and logged in before

Is there a User Event before the authentication is fired? I want to show a message if the user doesn't have a password yet and if it's his first login / check if he never logged in before - All in ...
4 votes
0 answers
160 views

Does Freeform Pro save partially completed entries or "drafts"?

I'm building an 8-page registration form or application and was hoping to use Solspace's Freeform Pro. I have some experience with it, but not in all of the capacities I'm hoping to use it for on this ...
4 votes
0 answers
878 views

How to handle Craft 3 events in a plugin? Element API is returning null data

The below refers to Craft 3 and the Element API plugin for Craft 3. I would like to do something when the Element API plugin fires its onBeforeSendData event, I can see in the controller for element ...
4 votes
0 answers
3k views

runtime isn't writable by PHP. Please fix that

I keep getting the error: mydomain.com/craft/storage/runtime isn't writable by PHP. Please fix that. I am running Redhat, and have set the folder permissions to 777, any ideas? Thanks in advance.
3 votes
0 answers
862 views

Craft in Docker throws '/app/web/cpresources doesn’t exist or isn’t writable by PHP'

I'm trying to deploy a Dockerized Craft CMS website. The basic setup is as follows: craft running in Docker nginx running on the server, using proxy_pass to point to docker container The setup ...
3 votes
0 answers
223 views

Add billing address to user on registration

I am working on a craftcms + commerce project and I need to add a billing address to new user during its registration process. The idea is to have a billing address added to any newly registered user ...
3 votes
0 answers
141 views

Freeform: Change field conditions between multi-page forms

I'm trying to only show some fields on Page 2, if a condition from a <select> box is met on Page 1. However, when I add Field Rules, I only have access to fields from the same page of the form. ...

15 30 50 per page
1
2 3 4 5
96