Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Unanswered Questions

900 questions with no upvoted or accepted answers
9
votes
0answers
609 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
245 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
175 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 ...
4
votes
0answers
625 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
220 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
115 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
194 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 ...
3
votes
0answers
128 views

Required alt text field in assets

I'm not sure if this is a bug or I'm doing this wrong. I have an asset volume called "Blog Images" and there is a custom required field called Image alt text. If I add images in assets section I'm ...
3
votes
0answers
61 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
204 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
162 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
101 views

Limit a field to entries by entry type

Is it possible to have an "entries" field but only allow selection to entries of a specific "entry type" within craft? I'm trying to use entry types as a sort of way to enable interfaces with chunks ...
3
votes
0answers
400 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
253 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 ...

15 30 50 per page