All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

block.type.handle Content Builder Matrix loop

I am attempting to make use of the method listed here https://nystudio107.com/blog/creating-a-content-builder-in-craft-cms twig template: {% extends '_layouts/base.twig' %} {% block sectionHeader %} ...
0
votes
1answer
17 views

How to upload animated webp files?

I've created an asset volume to which I can successfully upload jpgs, pngs, static webps etc. But when I try to upload an animated webp I get the alert: Upload failed. The error message was: “The file ...
1
vote
1answer
13 views

Use same handle for different fields on different entry types

I've got two entry types: blog and job. Each has a category field but different category groups: blogCategories and jobCategories. I would like to write a Twig include to accept either a blog or a job ...
1
vote
1answer
22 views

Password Update form accepting any data for currentPassword

I'm adding an update password form. This is not a reset password in case of a forgotten pw, but a form that allows users to update at their leisure. I have the current password field name="...
1
vote
1answer
13 views

Syntax for permissions in comments.php config file (comments plugin by Verbb)

I'm using the comments plugin (https://plugins.craftcms.com/comments) I'd like to define the 'permissions' settings via the config/comments.php file but can't find docs on the syntax to use. The ...
1
vote
1answer
25 views

Get related variants from entry and then show products for related variants and then loop only the variants that are related in commerce

Struggling with this one. If anyone can help me...? I have a section of entries called Vehicles. In this I have a related Variants field type. This has many different variants that related to each ...
0
votes
0answers
19 views

Can't save any data in sections

When trying to save content under the Settings > Sections I get no obvious (fatal) errors in the log files or in the debug bar, yet nothing saves and everything reverts to what it was on page load. ...
1
vote
2answers
28 views

Checking if a value is in an array of IDS - using a filter?

Is there an easier way to achieve this? Perhaps using a |filter function? {% set variantIds = [] %} {% for variant in product.variants %} {% set variantId = variant.id %} {% set variantIds = ...
1
vote
1answer
17 views

Craft Commerce - More detailed reporting

I'm looking to get more detailed reporting from craft commerce. I would like to be able to see a breakdown of what we've sold in a set period of time (week, month etc) which details out products, ...
1
vote
1answer
20 views

How do you download multiple plugins vis Command Line?

Coming from Drupal, we often use drush to download modules (plugins) and install them. For example this is what we might do using drush: drush dl bootstrap mailchimp stripe-php This would download the ...
1
vote
1answer
24 views

How to Auto-generate a Title based on a multiple entries titles? (using a Entries field type)

I have two sections (both Channel type): Releases Movies Releases have one Entries field type, the source is Movies So, I want Auto-generate a Release title from Movies, like this: Titanic, Avatar, ...
0
votes
1answer
21 views

why does a cart get added with no id?

Sometimes, the cart gets added without the id as below. Any ideas, please?
1
vote
1answer
29 views

Search for assets containing a custom field

How can I search for assets containing a custom field? The field on the asset is called lang. When I use this code no assets are found. {% set folderId = craft.app.request.getQueryParam('folderId') %} ...
1
vote
1answer
10 views

Programatically create a Neo block with children

I already discovered how to create a neo block programmatically from this post: How can I set a Neo field's values from my plugin/module? However, I don't know how I can create a neo block with ...
1
vote
1answer
28 views

Can’t run Craft CMS :(

I'm getting the following message, when I try to access craft admin. I have both the zip and unzip installed. Not sure why I'm getting this error. MESSAGE: Can’t run Craft CMS :( Your server doesn’t ...
1
vote
1answer
17 views

Error when trying to update Craft or install any plugin

When I try to update Craft, or install any plugin from the plugin store, I get the following error): Composer was unable to install the updates. Error: The url supplied for the path (plugins/redactor)...
0
votes
0answers
12 views

When Asset is Located in Root of Asset Volume - asset.getPath() Does Not Return the Volume as Part of the File Path

Context Asset Volume: staff (I'm using an S3 bucket as the source type) Image location: staff/john-smith.jpg Version: Craft 2.7.8 Results I expected that this query {{ staff.portrait[0].getPath() }} ...
1
vote
1answer
28 views

How would I detect whether an entry's asset field has been updated on save?

We need to send a notification email when an entry's asset field, Custom Image, has been updated on entry save. We're able to do this consistently for text fields but I'm having trouble doing the same ...
1
vote
1answer
56 views

/.craft commands not running from root

I can't run /.craft commands and get the following error: Craft can’t connect to the database. Check your connection settings. Unknown command: image-optimize/optimize/create Caused by: Exception ...
1
vote
4answers
38 views

Querying all content entries for a page

I'm new to Craft CMS and I'm trying to build a new website using Craft. I want my client to be able to change the order of displaying contents of a page by dragging and rearranging them in the Admin ...
1
vote
1answer
19 views

Remove expiration date field from section / entry type

By default, every entry has an expiration date field allowing the editor to expire an entry. I'm currently working on an application with some sections where expiring an entry doesn't make much sense ...
1
vote
1answer
15 views

Freeform to show via Vue Js

I have 3 freeforms - form 1, form 2 and form 3. I want a select option on which I click and the necessary form opens as per the selection. Can I render the Freeform which are build using VUE js Select ...
1
vote
1answer
16 views

Redactor - doesn't generate unordered list

I'm using Redactor v2.8.5. it doesn't render an unordered list in HTML? How do I fix it?
1
vote
1answer
27 views

Efficient way to get all related entries assigned to matrix fields across a set of entries

I have a scenario where level 1 structure entries each have several to tens of level 2 child entries, and several to tens of entries in a different channel which are also allowed to be related to the ...
1
vote
1answer
31 views

Entries Overview: Add Field Columns

Does anyone have an idea how I can add columns in the entries overview? Columns with the title of the fields that exist in the page and are filled with content. Thank you
0
votes
0answers
8 views

Knock Knock plugin throws »Request contained an invalid body param« after submitting password

I've freshly installed the Knock Knock plugin. When I submit the Password for the first time, I get the following error: Request contained an invalid body param After a Refresh it works just fine. But ...
2
votes
2answers
92 views

Filter Entries by Matrix Block

I have a matrix field with two block-types ("sound" and "video") I want to get all entries that have a matrix field with a certain block-type. At the moment I have: {% set entries =...
1
vote
1answer
14 views

Countries Field for Freeform

The Freeform docs say there is a predefined option for Countries, but I do not see it anywhere in the Field types or existing fields. How does one access this? Using the latest version of both Craft ...
1
vote
1answer
14 views

I need to embed some forms into a new site

We are moving to a new Craft site and we have some forms that live on our form server. I am wanting to embed these forms into the appropriate pages. There is a PHP file that I can download that looks ...
0
votes
0answers
18 views

Commerce Gateway Response

Im looking for where to get the Gateway Response as the site I am working on is carrying over a legacy subscription system. Using verbb / commerce-payflow Plugin. Any pointers would be great we ...
0
votes
0answers
20 views

baseCpUrl doesn't seem to work as I'd expect

We have a couple of different repos doing various things all on the same URL. All of these have a web folder equivalent and want to be above the root. With that in mind, I've set up the following ...
1
vote
1answer
19 views

vhost.conf and general understanding

I am new to craft CMS and installed it in an Amazon EC2 instance via Composer. This worked. My vhost.conf looks like this <VirtualHost *:80> ServerName craft.example.com DocumentRoot /var/www/...
1
vote
1answer
35 views

Sending E-Mails via SMTP with email address that contains special characters

I got a problem with some smtp settings in my craft 3.5.14. The domain of my client uses special characters like (ö, ä, ü) and therefore for their email addresses. In this case my client only use the ...
1
vote
1answer
25 views

Add items to user's cart in Craft Commerce 2

I'm trying to add items to user's cart from a plugin but I'm stuck on getting cart of a user other then current user. I have the code for adding items to cart, it's something I used on current user. ...
1
vote
1answer
25 views

Do “update cart” and “complete cart” as one action

I am developing a site which has "normal" shop stuff that is added to cart and bought through the checkout process. But it also has to support submitting requests for food catering jobs. ...
0
votes
0answers
36 views

Get categories with the number of entries

I would like to retrieve the categories of a group, the name and their fields, but with each one the number of entries that have this category assigned. It's like this question but I'm not using twig ...
1
vote
1answer
22 views

Additional code to run when cache is busted(entry added/updated, etc)

I'm using Craft Pro 3.6 in Headless mode. I've found that caching the GraphQL responses on the frontend server dramatically speeds up our load time, even with enableGraphQlCaching turned on. What I'd ...
0
votes
0answers
22 views

Why might I be unable to delete entries and uninstall plug-ins in Craft CMS Solo 3.6.12?

I know the two things may seem unrelated but the actions are both red items in their respective dropdown menus and perform destructive tasks. In Entries, I was unable to delete a couple of test ...
1
vote
1answer
30 views

Rebuilding my portfolio site from scratch in CraftCMS 3 and having an issue getting content to display

I'm rebuilding my portfolio site in CraftCMS 3 and started building some VERY basic templates to test the sections and ensure everything is connecting properly before uploading a bunch of content and ...
0
votes
0answers
9 views

Commerce module - update purchasable ID on save line item

I'm trying to update a purchasableId against a line item (eg if the variant changes) via a custom module/controller (long story short native controller is not updating options stored against against ...
0
votes
0answers
23 views

Simplifying code using the new andRelatedTo param

I have the following code that works with Sprig. But with the new andRelatedTo param, I am wondering if this could be simplified? However, I am a little unsure if/where to start on this and how the ...
0
votes
0answers
13 views

Commerce 3 update line items

We are updating an old Craft Commerce 2 site to Craft Commerce 3 which features a fair bit of bespoke code from a previous developer. The site features bespoke pricing based on a values stored in/...
2
votes
1answer
62 views

How do you unit test plugins?

I have Codeception running on my local install without errors, but it's not yet actually doing anything. I am building several plugins and I can't figure out how you actually test a plugin? I have no ...
1
vote
1answer
45 views

Specify FolderId When Uploading a File on the Frontend

In a front-end form where I am uploading a file, I need to specify a specific subfolder. I can't do it in the cp dynamic field for reasons so I was hoping to use a hidden field to set the folderId. ...
1
vote
1answer
32 views

Serve remote files instead of local ones (with a nitro setup)

I'm new to CraftCMS and slowly learning how to use it. I'm creating a site. The local setup was done with Nitro. I have read about the ways to synchronize data and assets across environments. But I ...
1
vote
2answers
42 views

Synching content and template files across environments

I'm new to CraftCMS and have a few basic questions about synching contents between local and remote development environments. This has been discussed in other posts by I'm looking for more specific ...
1
vote
2answers
39 views

Count number of consecutive years in category array

I need to count the number of consecutive years a user has been a member of our organization. For example, if they've been a member from in 2018, 2019, 2020 and 2021, their loyalty will be 4 years. If ...
0
votes
0answers
42 views

FeedMe certificate verification issues

I'm working on an import of a feed from a Simple Machines Forum (SMF) which contains images from lots of external sources. Some of the images are importing OK, but most of them are failing with: ...
0
votes
0answers
20 views

Complex Autocomplete

I want to write a more complex autocomplete search for a craft site. I know there are already some posts here that go in that direction. As they also tried, I approach this problem first by using the ...
0
votes
0answers
16 views

Field type that lets me select fields

I am trying to find a field type that lets me select one or more fields. I want to use this on a category to let the user select which fields should be used a faceted filters on the product listing.

15 30 50 per page
1
2 3 4 5
261