People who code: we want your input. Take the Survey

Questions tagged [craft3]

For use with questions relating to the Craft 3 version of Craft CMS, including the Beta and RC releases.

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

Is it possible when using the DateTime field in Freeform to block dates AND times?

I'm using the freeform plugin for a reservation system. The enduser can book a date and time (30 min intervals). Blocking dates seem straightforward but I don't know if it's possible to block a ...
0
votes
0answers
15 views

SEOMatic Entries not rendering SEO Options Tab

Following an upgrade from Craft 2.6 to 3.6, the SEOMatic plugin is not rendering the SEO Tab for the entries. Any ideas on why this would be? I've updated the settings in the SEO Content in the ...
0
votes
0answers
12 views

Join multiple tables in element-api

My problem is the following: I have a website with products which contains ratings. I have an element-api endpoint to get the products. I want to sort the products based on the average rating or the ...
2
votes
1answer
23 views

Get a list of last level categories in an entry - Craft CMS 3

I saw some similar questions, but not specific like this. I have a list of categories, some have only 1 level, other go to 2nd level hierarchy. Entries can have up to 4 categories related, and they ...
1
vote
3answers
58 views

CSS file not being read by other templates

So I am making a new craft cms website, I have my page entries linked to the template pages/_entry.html, which works fine. I then made another type of pages called news, linked to the template news/...
1
vote
1answer
33 views

How to use Sprig to filter categories using a dropdown

I'm having an issue where I'm adding a dropdown to my search to filter through the first parent attribute in a category (Winter 2020, Spring 2021, and so on). The search field works, but nothing ...
0
votes
1answer
53 views

Import large number of entries every day - 1 million

I have a shopping product feed that is generated every day with around a million products. This can be in any format needed - CSV, JSON, XML etc, and will live on an S3 bucket. Each day, I need to ...
0
votes
0answers
28 views

Automatic Asset Cache Clear

I have a large website that various users need to upload important documents (assets) to frequently. I need to have the Craft asset cache clear every time a new asset is uploaded. The other option I'...
1
vote
1answer
25 views

Access env variables in custom php files

Craft Version 3.2 PHP Version 7.2 Below is my folder structure: Root - Other Craft Folder - Web - Services - Db.php - env file I want to read the connection string of the SQL ...
0
votes
0answers
19 views

craft cms how to modify redactor image upload path

So for my assets field types, I have the Asset Location (Where selected assets should be stored.) set to: {owner.type.name}/{owner.slug} this neatly puts all the files I upload via the asset field ...
4
votes
1answer
68 views

Modified A-Z grouping

I'm trying to output the alphabet where certain letters are enabled/clickable based on whether any entries from a specific section start with that letter. Here's the UI: Getting the A-Z is easy ...
0
votes
0answers
19 views

Internal Server Error after upgrading from craftcms 2 to 3

I just upgraded from Craft 2 to 3.6.14 (latest). I was able to successfully to the upgrade. I am able to get into the admin and was even able to install the feed-me plugin. I ported over all the files ...
1
vote
2answers
22 views

Icons not loading in admin

In some instances of my websites the icons don't load properly. Everything else in the website works, but the icons don't load. The other websites on the same server with the same php.ini file don't ...
0
votes
0answers
28 views

Variable “entry” does not exist - error on homepage single entry

Relatively new to CraftCMS and getting Twig error "Variable "entry" does not exist" on my home page. Noticed another post said to leave URI blank which should fix but didn't. Just ...
1
vote
1answer
36 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 %} ...
2
votes
1answer
28 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="...
0
votes
0answers
39 views

Why does a cart get added with no Order Number?

Sometimes, the cart gets added without the id as below. Any ideas, please? (Craft Commerce version is 2.2.19)
1
vote
1answer
17 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
35 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
61 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
41 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
18 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
38 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 ...
0
votes
0answers
45 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 ...
0
votes
0answers
29 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 ...
1
vote
1answer
41 views

How can I make make the class of an entry link “active” if entry is the current url?

I'm currently using the below jQuery but it's buggy as it relies on looking for 'similar' URL and not the exact URL. Is there a way it can be done just using Twig? {% set mainNavigation = craft....
1
vote
2answers
31 views

Rendering form from Entry Field

I'm trying to pass an entry field type "Formfield" into a template. I have it working without passing any custom values through but when I do it outside of the render tag, No matter what I ...
1
vote
0answers
16 views

Removing or hiding certain fields from the CP new entry for a specific user group

I'm trying to make some fields unavailable for a certain user group when they create or edit a new entry. These fields should only be available to admin users. I had implemented this by extending the ...
2
votes
1answer
18 views

Title Format - Object Label instead of Value

I am trying to get the label from an object instead of its value to use as the automatic title for my entries. For example: I have an entry that contains a dropdown with the handle exampleOne with ...
2
votes
0answers
13 views

Express Form: Get submitted data on success page

I have a very simple question. In Craft CMS, using Express Forms (free edition), I have a classic scenario. Page with the form, created by the form.openTag() method A success page which has '/success'...
1
vote
1answer
50 views

Craft3, Plugin Craft Commerce, Tax without percentages

Is it possible to set Tax in the Rate field other than percentage?. In Tax I want to place an example amount: 10.50 without percentages.
2
votes
1answer
57 views

Error with Craft CMS set up and composer: failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

Hi I am trying to set up craft CMS with composer. I am using MAMP on a mac and I just cannot get it to connect. I get this error even though I know the password is correct. failed: SQLSTATE[HY000] [...
1
vote
0answers
16 views

Non-admin users cannot preview/view entries when site front end is disabled (multisite)

I am running a multisite setup on 3.6.11.2. We are attempting to generate a new site and while we work on the structure/content I have the 'Enable on the front end' setting switched off. As an admin, ...
2
votes
1answer
30 views

Craft CMS GraphQL count query

I've got the GraphQL code posted below, but I'm not sure how do I count the total of returned products . Do I need another query just for the products without offset ? I need it for a pagination ...
1
vote
0answers
22 views

Craft 3 entry.author.getPhoto() is coming up null on template, but the author has a photo uploaded in the user > details section, any ideas why?

The site is utilizing a Servd bucket to store all assets. The backend shows a photo successfully uploaded to the user > details section, but does not provide a url in the entry.author.getPhoto(), ...
2
votes
1answer
32 views

Force craft to do another job (queue) and pause the current one

I'm currently working on a plug-in for Craft. I have to work with a lot of data and, some steps are slow. So that's why I added them to a job system. This job is doing a lot of stuff. That job is ...
1
vote
0answers
28 views

Problems cloning an old production Craft CMS project

I'm attempting to clone a craft CMS (v3.3.15) project into a new local development environment and as expected, I'm experiencing many dependency issues. For various reasons, including having to ...
2
votes
0answers
29 views

Disable Two-Step Publish Workflow?

I recently updated to Craft v3.6, which appears to have changed the publishing workflow to require first publishing the draft, then saving the file in order to get back to the entries list. Is there ...
0
votes
0answers
29 views

Nitro 2 on WSL craft failed permission change in cpresources

I get the following yii exception after installing and adding a Nitro2 site to WSL. Failed to change permissions for directory "/app/web/cpresources/1453c57f": chmod(): Operation not ...
0
votes
1answer
29 views

How to remove entries with craft migration safeDown elegantly

I am migrating some entries into Craft for the first time and my saveUp is quite simple where I use the saveElement function. The problem is after doing a few safeUp's and safeDown's I'm getting some ...
1
vote
1answer
49 views

Craft CMS - 3.6.11.1 - Why are Assets Backed Up to Temporary Storage?

Since updating Craft CMS to the latest version I noticed that our uploaded files get backed-up daily to temporary storage. Uploaded files live on DigitalOcean Spaces so we have no need to back up ...
1
vote
1answer
87 views

Sprig “Load more” not loading over https

I've recently added an SSL to the site I'm working on, and it seems to have broken my "load more" buttons via sprig. When I click the button now, I get Blocked loading mixed active content “...
1
vote
1answer
58 views

Invalid path alias: @ error

I have a site running Craft 3.6.11.1. I've been working on it for a while, have multi environment config set up and everything working great. I have recently installed and uninstalled quite a few ...
1
vote
1answer
43 views

how to get request url?

I'm trying to get url from request, {{ craft.app.request.url }} but the uri is chinese, like "localhost/測試", it print out "http://localhost/����" did i miss some setting in craft ...
1
vote
0answers
34 views

Craft warning: Tried to release a savepoint, but it does not exist

I'm working on a plug-in for Craft 3. For this plug-in is a migration is needed. When this migration runs and adds the entries, fields, and groups then the following warning occurs in the logs. [...
0
votes
0answers
18 views

Mailer Service Error when sending notifications emails on Freeform Pro

Can anyone give me a bit more insight into why I'm getting a "Mailer Service" error when trying to send an Admin Notification with Freeform Pro? I get an error like this: Unexpected end of ...
1
vote
1answer
25 views

In Craft Commerce, is it possible to make the product variant weight a required field?

In Craft Commerce, is it possible to make the product variant weight a required field? We are using weight to calculate shipping so it would be good if we could make it a required field to ensure that ...
0
votes
0answers
16 views

How to programatically (e.g. in a custom a plugin) create a Discount Code? (Craft Commerce)

I've been working on some custom plugins recently to handle various bits of API functionality for the project I'm working on, and I'm now roughly familiar with Craft's OO approach to carrying out this ...
0
votes
0answers
24 views

Changing URL format in craft commerce products error 502

I have more than 150k products on craft commerce, and i need to do some changes in the URL format, but when i click save, the server returns a 502 error. I think that is because craft is trying yo re-...
1
vote
1answer
45 views

In Craft Commerce, is it possible to show a more meaningful error when the customer tries to add more of a product than is in stock to the cart

Currently, if a customer attempts to add a greater quantity of a product to the cart than is in stock, an "Unable to update cart" flash message in shown. e.g. there are 3 in stock and the ...

1
2 3 4 5
34