Unanswered Questions
1,398 questions with no upvoted or accepted answers
9
votes
0answers
798 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
0answers
266 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
320 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
242 views
Search weighting
Is there a way to control the weighting of certain fields in Craft when using search in the front-end?
I have a Products Channel which I am trying to search against and I want to be able to boost ...
4
votes
0answers
454 views
Autocomplete for Visual Studio Code for plugin development
How to achieve autocompletion for Craft 3 for PHP inside Visual Studio Code?
I mean, what is required (like installing PHP locally, folder structure etc.) if at all possible?
I assume many people who ...
4
votes
0answers
811 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
256 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
150 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
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
0answers
29 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.
...
3
votes
0answers
72 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 ...
3
votes
0answers
82 views
Craft Commerce: Create new shipping zone by excluding other zones
I need to create 3 shipping zones in Craft Commerce 2 (currently on v2.1.7):
UK
Europe
Rest Of The World
Having to manually add the countries to the UK and Europe zones isn't too much of an issue, ...
3
votes
0answers
506 views
Searching for Multiple Categories and Tags
I've been pulling my head for the past day on how to filter products with multiple categories.
After a long search, I found and implemented on my project, Advanced Search with tags and categories
It ...
3
votes
0answers
84 views
Can you make Craft 2 Stateless?
So we are moving to Google App Engine Flexible which means we cannot store sessions on files. So I wanted to know if anyone has been able to make Craft 2 Stateless and how was it accomplished?
Thanks....
3
votes
0answers
104 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 ...