The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Unanswered Questions

1,089 questions with no upvoted or accepted answers
9
votes
0answers
645 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 ...
5
votes
0answers
200 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
0answers
261 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
0answers
272 views

Craft 3 Custom Plugin: model validation

Struggling a bit here - have created a custom plugin where I want to validate form submission against a predefined model before saving to the database. All pretty straightforward so far … However, if ...
4
votes
0answers
708 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
0answers
229 views

Using plugin template on front end

I'm working on a plugin called modelselector and I want to use a template stored in the plugin templates folder but it should be shown on the front-end of the website. Currently the following direct ...
4
votes
0answers
123 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 ...
4
votes
0answers
2k 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
0answers
72 views

Dukt Social Plugin Not Creating User

I'm currently Authenticating users via OAuth and Social Login by Dukt. I have Facebook app all set up and running as well as Twitter. The user gets redirected, asked to Authorise but when it returns ...
3
votes
0answers
248 views

Mailer config in Craft 3 not getting merged

I have this custom config in config/app.php, but Craft seems to keep using the default Control panel Sendmail config. It seems this doesn't get merged in the main.php file. (as promised) return [ '...
3
votes
0answers
81 views

Algolia indexing disabled items in Craft

We have Algolia search running on our Craft install through the Search Plus plunin. When I disable an entry I'm finding that it is still searchable through Algolia, which then results in a broken link....
3
votes
0answers
181 views

Is there any way to include Solspace Calendar events in a global site search?

I have a client that wants their Solspace Calendar Events to show up in the global site search results (along with entries from other sections) My first thought was to query the entries and calendar ...
3
votes
0answers
431 views

Currency switcher

Folks: I'm setting up a multi-currency site (CAD, USD, EUR). I'd like the user to be able to select their currency before they actually put anything in the cart. And once selected, prices throughout ...
3
votes
0answers
265 views

Task “Resaving all localizable elements” is stuck when adding new new locale

I'm trying to add a new locale, but the task "Resaving all localizable elements" is stuck and the new locale is not being added to content. Even after restarting the task. There are no errors in the ...
3
votes
0answers
235 views

How can I create a dropdown field programmatically with a plugin?

I'm trying to create a Dropdown field and add it to the User field layout. I've successfully created an empty dropdown field (no options) and added it to the User field layout. Here is my current ...

15 30 50 per page