Unanswered Questions

1,373 questions with no upvoted or accepted answers
9 votes
0 answers
964 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 ...
6 votes
0 answers
316 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
1 answer
201 views

How to use Browsersync within Craft Nitro

I have a Craft CMS site running locally, using Craft Nitro. I want to use the nitro node container, rather than my own, which works beautifully except with regard to browsersync, and I'm not sure what ...
5 votes
0 answers
265 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
198 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
426 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
522 views

Commerce 3 products with dynamic options

I am well-versed in CraftCMS and am finally able to use Craft Commerce 3 for the first time on a project (first time for any version of Commerce, actually) and it's to build a platform for a butcher ...
4 votes
0 answers
651 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/...
4 votes
0 answers
175 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
227 views

Prevent Redactor from stripping tags like <span>

Is there any possible way to prevent <span> tags from being stripped from a Redactor field? I've tried all I can using custom Redactor and HTMLPurifier configs to no avail. Basically what I'm ...
4 votes
0 answers
408 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
143 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
865 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
573 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 ...

15 30 50 per page
1
2 3 4 5
92