All Questions

0
votes
0answers
10 views

How to merge multiple 'relatedTo' queries via query parameters

I'm trying to augment a Commerce query with additional parameters like so, but I can't get 'colour' and 'range' working together. Clearly my and/relatedTo syntax is wrong but how exactly? {% set ...
0
votes
1answer
14 views

DB Queries in Craft Commerce 2 with large data

Currently working on an e-commerce site, which currently has over 4000 products with a mass of variants (averaging 3 variants per product) - and hit a few hurdles on the way... At present, craft....
1
vote
0answers
12 views

3.1.x SiteNotFoundException

Not sure if this is related to Craft 3.1.x, but since I ran that update this afternoon, I can't update details of my Site anymore. If I go to Settings > Sites and try to update anything in there (like ...
1
vote
0answers
22 views

Can't update to 3.1.x

I'm in a multi config env, local, staging & production. I sync my databases down to local then usually update locally, then push to staging and check again before going live. The recent 3.1 ...
0
votes
0answers
10 views

Is there a way to reset the focal point in Craft?

As the question states. Is it possible to reset the focal point in the CMS? I cannot see any obvious setting? If not could this perhaps be a feature request for a reset focal point button?
1
vote
0answers
6 views

Get entries related to same category

I have a channel (handle: "infopages") with entries. I have a channel (handle: "products") with entries. I have a category (handle: "productTypes") Every entry from "infopages" has a category field, ...
0
votes
0answers
11 views

Checking permission for editing entries from inside template

How do i check permission for editing entries belonging to specific section? When i try {{currentUser.can('editEntries:'~entry.sectionId) }}, it returns false - and i am sure that currentUser can ...
0
votes
0answers
17 views

HTML Purifier Allow <script

I understand the implications of having a script tag in my redactor field. But I am importing approx. 5k articles in to a Redactor field, some of which have various tags from embedded Podcasts, ...
2
votes
1answer
15 views

Missing “Plugin Store” navigation on Craft 3 admin section

I am a newbie to CraftCMS and just installed my very first Craft Project on local Xampp. Everything looks good except the "Plugin Store" navigation menu is not showing up. Is there any trick or tweak ...
1
vote
1answer
10 views

Matrix block Element API call on null error

I get this JSON error when trying to output content of a matrix block called proLinks using the Element API. Call to a member function all() on null The code is as follows (I've shortened it and ...
1
vote
1answer
12 views

How to set view path for rendering email templates?

Trying to send an email Craft::$app->setViewPath('/Users/stian/dev/site.com/templates/'); Craft::$app->mailer->compose('confirmation.twig', ['orderId' => $orderId, 'customerId' => $...
0
votes
0answers
19 views

Reset user password

User password reset mail is acting weird. When resetting the user password the mail I receive has forgot_password_subject subject and forgot_password_body content. I tried checking the source code but ...
0
votes
0answers
19 views

Broken Asset Previews/Transforms

The asset previews in my CP are displaying as broken, and certain image transforms on the front-end template are broken. If I preview a file in the Assets panel it displays fine, so it seems to be a ...
1
vote
1answer
15 views

“Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later.”

I have a problem related this and this question. I began updating a long time ago (2017?) and got the error "Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later"...
1
vote
1answer
21 views

Craft CMS usage of punycode

Our malware scanner detected punycode as malware in /vendor/bower-asset/punycode/... In light of punycode being used to mask some IDNs like wikipedia.org etc. I would like to know what the usage of ...
0
votes
1answer
16 views

How to add tags in craft CMS 3

This is my first template that im working on in craft cms3, i've managed to make the most of the homepage and other tabs of website dynamic using the CMS, but I can't figure out how do I make tags and ...
1
vote
1answer
47 views

HTTP 500 Error after trying to update to Craft 3.1.1

I just tried to update Craft to 3.1.1 from within the CP. The install failed and I got an Internal Server 500 error. I now can't load either the front or backend of the site, I get a 500 error in both ...
0
votes
0answers
8 views

How to get core shipping methods in Commerce 2? How to save an order?

Is there an equivalent function to commerce_shippingMethods->getAllCoreShippingMethods() in Commerce 2? I can only find Commerce::getInstance()->getShippingMethods()->getAllShippingMethods();...
0
votes
0answers
20 views

Limit users to one session at a time

Building a website to host webinars where subscribed users will pay a monthly fee. Need stop multiple people logging in on the same account to gain access. I'm attempting to clear all existing ...
1
vote
1answer
35 views

Simple webshop solution (Craft Commerce)?

I am looking for a simple shopping solution for one of my customers. Since their website is already running with CraftCMS, I am looking if there is any integrated solution available. However, so far ...
1
vote
1answer
20 views

Is there an equivalent to IOHelper::ensureFolderExists in Craft 3?

Migrating Plugins to Craft 3 starts bugging me, seems that really everything changed. Is there an equivalent to IOHelper::ensureFolderExists in Craft 3?
1
vote
0answers
11 views

500 Error with CraftQL

I’ve installed CraftQL and can successfully query from the Craft admin interface but when I hit the endpoint using Axios I get a 500 server error. I've checked that my endpoint matches what's set in ...
0
votes
0answers
11 views

Calling Two Separate Plugin Variables on the Same Template

I'm new at writing plugins, but I've got 2 separate plugins that work independently. Now, I am attempting to use them on the same template, and the second one in the code does not work. I can switch ...
1
vote
1answer
22 views

Interne Serverfout after one click update

Hello and good evening, After the one click update the message 'Interne Serverfout' appears on the screen. One can no longer connect to either the fron or backend of the installation ? What is the ...
1
vote
1answer
24 views

Query returns nothing on matrixBlock

I'm a bit confused by the way that Craft now handles Matrix blocks. I've read the documentation a few times and I'm still not sure if I have it. Here's what I have: {% set myMatrixBlockQuery = craft....
1
vote
1answer
11 views

How do I create console commands for my module or plugin?

I would like to create a custom console command for my Craft 3 plugin. I've looked at the Yii docs and understand commands are defined using controllers extending \yii\console\Controller but cannot ...
1
vote
1answer
15 views

Pro licence error - Craft is unable to purchase an edition upgrade at this time

I'm trying to purchase a pro license for Craft 2. The site was on a staging server which is now uploaded to the live server. At first, there were 2 warning messages. First saying running Craft Pro on ...
1
vote
1answer
19 views

Craft 2, MySQL database, Twig, JavaScript files

I have created in Craft 2 CMS, under the profile of users (ex. parents), new tab for (children), where parents can fill in there children information. The data is saved in a database under the ...
1
vote
1answer
38 views

Super Table -> Matrix data loss

I updated to the newest Craft Version 3.1.1. Since then I have the following problem. I lost all the data from Matrix Filed stored in a Super Table Field after changing Field Setup (Matrix - Asset ...
1
vote
1answer
13 views

Log Errors from twig template

I need to log flash messages from craft.session.getFlashes to a error log file from a particular twig template in Craft 2. Is there a way to do it ?
1
vote
1answer
11 views

How to validate a form request

Is there anything with craft like Laravel's Form Requests? I am writing a plugin with a custom entry type. Right now, I am doing the store/edit pages and I do not want to reinvent the wheel ;) Is ...
1
vote
0answers
7 views

Freeform AJAX submission not working when two forms are on same page

I have two Mailchimp subscribe forms on the same page – one in the sidebar and one in the footer. They are created as separate forms in the admin, albeit one a duplicate of the other, with different ...
1
vote
1answer
16 views

PHP eval filter for Twig

If I am confident in the users of our webpage that they will never be messing with the Twig templates, then what risk is there to creating a |php filter for Twig that just does this? {% set text = "...
1
vote
0answers
44 views

Craft 3.1 Deleting Anything Renders CMS Unresponsive

I have a Craft install setup on a LAMP Digital Ocean droplet - everything has been configured to the install requirements. Yesterday I started having issues with not being able to delete entries, ...
2
votes
2answers
14 views

How to process POST and entry fields when using same form for Add as Edit on front end?

I use the same form for adding an entry on the front end as I do for editing it. So when editing it, we need to insert the field values in the fields. When editing or adding it we also need to re-...
1
vote
1answer
34 views

Craft CMS 3 Content Mover

My database was corrupted after updating to 3.1.0 and no backup. Is there any script to move fields, sections and other staff to new fresh database? Update I found something like this scripts, but ...
1
vote
0answers
9 views

Image Store Issue

Dear Craft Users/Developers We have inherited a customer on our server platform using CraftCMS 2.7.4. They had their site before moving to us hosted with images using Rackspace via the CraftCMS Pro ...
1
vote
0answers
31 views

Element API SearchQuery to search for value inside child-entries

I currently try to use the Element API to build a search. Unfortunately I'm kind of stuck. I have a baseEntry, that has a field that references entries (let's call them subEntries) of the section ...
0
votes
0answers
7 views

currentSite not working as expected in image subpath reference

I'm using {{currentSite.handle}} as a subpath reference in an image field, but it always returns the primary site's handle, even if I'm editing an entry under a different site. Is there a way to get ...
1
vote
0answers
15 views

Event archives with custom date field

I'm trying to set up a past events archive. Followed the guide provided by PT: craft cms guide to set up an archive. The only difference is that I use a custom date field (dateAndTime) and not ...
1
vote
1answer
82 views

Getting PHP Error on upgrade from 3.0.36 to 3.1

I just updated to 3.1 and I'm getting the php error: PHP Notice – yii\base\ErrorException Undefined index: settings It probably has to do with the Cheat Sheet plugin. I deleted that folder in the ...
1
vote
1answer
14 views

Current day display on day later

in the CP settings, timezone is set to UTC +1 Europe/Zurich when I try this code: {% set currDay = now|date() %} {{ currDay|date('l d F Y') }} it outputs "Mercredi, 16 janvier 2019", but we're ...
0
votes
0answers
20 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 ...
0
votes
1answer
21 views

Craft Commerce multisite, different tax rates

In Craft 3, Commerce 2 is there a way to set a different tax category or rate on a cart/site when using commerce in a multi site environment? Site A (b2c website) has tax rate 1 (21% with tax included ...
0
votes
0answers
9 views

Freeform Render tag isn't rendering a form attribute in my templates

I'm trying to use Freeform Lite in conjunction with Vue.js. I'm trying to use Vue for the form validation. In order to do so, I'm using the following code to render the form tag: {{ form.renderTag({ ...
1
vote
1answer
34 views

Use conditional for Element API results?

Using the Element API is there a way to get entries by dateUpdated OR dateCreated within the last whatever time, say day? Or a way to get the entry IDs for both of those criteria then do a query ...
0
votes
1answer
22 views

FreeForm: Accessing a fields customAttributes

Is it possible to access customAttributes on a FreeForm field? Currently attempting to do this via: {% for row in form %} {% for field in row %} {{ dump(field.customAttributes) }} {% endfor ...
0
votes
1answer
14 views

Element query: find entries where a field's value is greater than, or less than another field's value?

I would like to do something like this: craft.entries.section('mySection').field1('> field2').all() And it should return all the entries in mySection whose field1 value is greater than their ...
1
vote
1answer
22 views

Can I use Twig in a FreeForm html field?

Is it possible to use the {{ siteUrl }} Variable in a html Field in freeform? I tried it and it threw an error that the variable was not valid. Is it possible to use twig in a html field?
0
votes
1answer
10 views

Template query: Advanced section query to get unique items from custom entry type field

I'm trying to build a filter for a blog section in Craft 3. I'm fairly new to Craft and my client now wants a dropdown filter where they can filter out authors. Thus, I want to write a query that ...

15 30 50 per page