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
2
votes
0answers
27 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
54 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
148 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
24 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
88 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
28 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
76 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
33 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
32 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
92 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
38 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
69 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
168 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
188 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
87 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
107 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
35 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
33 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 ...
1
vote
0answers
50 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
53 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
78 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
vote
1answer
20 views

Making custom changes to CP language

I want to change a few words in the CP (Craft 3). What's the best way to do it, without being overwritten by a Craft update if possible...? I was thinking about creating my own language file, but can'...
1
vote
1answer
29 views

Saving matrix field of a duplicate of an entry not working

I'm creating a cron job to automatically import new entries (vacancies). I have an entry that I use as a template with some standard data fields and matrix fields. If it's an entry that has not been ...
2
votes
1answer
32 views

How to create a new Tag group and save it?

I'm new to the Craft CMS framework and have a question about tags. How can I create a new tag group? You can create a tag list by hand via the admin panel > settings > Tag Groups > New Tag ...
2
votes
2answers
274 views

How to filter entries by checkboxes using Sprig

I am using the Sprig plugin to filter news entries on a news overview page. I have three checkboxes for the categories related to the news entries. I have the page working for the basic functions by ...
1
vote
1answer
47 views

How do I display entries depending on multiple relations?

In this example, I'm trying to show entries with the category "Beer". This works: {% set myCategory = craft.categories.slug('beer') %} {% if entry.relatedDrinks.relatedTo(myCategory)|length ...
0
votes
0answers
151 views

Barba.js (with gsap) 'leave' and 'enter' hooks not working in Craft 3 - same code works in WordPress

The below code (Barba/gsap) works as expected in WordPress, but in Craft 3 only the 'once' (i.e. not the 'leave' and 'enter') hooks fire. There are no errors or anything unusual in the Barba debug ...
1
vote
1answer
25 views

Passing multiple arguments to a macro?

I have a link on a website that i'd like to set a class of active on, based on different segments. {% macro is_acitve(segment) %} {% if craft.app.request.getSegment(2) == segment %}active{% endif %...
0
votes
0answers
15 views

Different unix users for Craft config and Craft process

I want to configure Craft to run as user craftcms and have configuration owner craftowner. The purpose is to make configuration read-only to craftcms, so that there can be no changes to the ...
0
votes
0answers
31 views

Triggering different webhook when product is updated by Feed Me

I have two different webhooks that need to run when a product is saved. Webhook 1 should only run after manually saving the product Webhook 2 should only run after Feed Me saves the product Is ...
0
votes
0answers
10 views

Batch check date and alter entries

Good Evening. Im looking for a way to regularly check a full section of entries to see if a date has been passed. If it has I want to place a checkbox marker within that entry. Has anyone come ...
1
vote
1answer
64 views

Craft Setup 3.6.5.1 with MYSQL with SSL version 5.7.29

I'm trying to install Craft version 3.6.5.1 with MYSQL version 5.7.29 from Azure. While setup it fails with the following error Testing database credentials ... failed: SQLSTATE[HY000] [9002] SSL ...
0
votes
0answers
23 views

Using Element API to pull child categories

On Craft, I can assign categories to my different customers: a customer might be "Cloud", "Software" or "Energy". I have set it up so that you can also choose ...
0
votes
0answers
37 views

Searching for specific MatrixBlocks with either GraphQL or PHP

I'm building a search for my Craft site right now. Finding entries is fine. I usually have the structure that one entry is one site in the frontend. I sadly also have entries that are way longer. So ...
1
vote
1answer
59 views

How to search for Entries that have a particular Category set within a Matrix field in the Control Panel?

I have an arrangement like this: Entry type 'people' └ Matrix field 'offices' └ Block type 'office' └ Category field 'building' On the Entries screen, how can I search for people that have a ...
0
votes
0answers
31 views

File Upload Validation in a Front End form

Good Evening. I have a front end form that allows users to upload up to 4 images to an asset field, however the file chooser allows for more than 4. This causing an issue with any further updates at ...
1
vote
1answer
26 views

Blog/_entry breaking all assets globals like header & footer logos

When templating my Craft site, I have run into an issue with on both my Local & Server environments on the latest version of Craft. I am running a LAMP stack and I think I have been able to narrow ...
0
votes
0answers
109 views

Why is my base installation of Craft 3 so slow on Azure App Services?

I am evaluating a few different CMS solutions for my company's new website. Everything about Craft looks great according to my research. After installing version 3 onto an Azure App Service Linux ...
0
votes
0answers
32 views

CSS and JS tags with custom version parameter

When using {% css '/path/to/file.css' %} craft adds a v= query parameter by itself so that it comes out like this: <link href="/path/to/file.css?v=1612895916" rel="stylesheet"&...
1
vote
1answer
55 views

Order by reverse relationship count

It feels like I’m trying to do the impossible, but I can’t imagine this problem is unique to my project. Hoping someone here has figured it out before! I have two channels, creators and products, and ...
1
vote
1answer
28 views

Freeform unsubscribe and redirect non admin users away from admin area

Good Evening all, I have a site that lets users subscribe/unsubscribe using Freeforms Stripe payments. Everything is working fine, except for when the user unsubscribes, the link that is required is ...
0
votes
0answers
68 views

Cache not working

I'm having troubles with my site being super slow. It seems like caching isn't working. When I upload the site to a different server, everything seems fine. When I empty the template cache and load ...
0
votes
0answers
39 views

Users creating their own custom subscription or bundle in the frontend?

I am trying to add a feature to a store (using Craft Commerce 3) that allows users to create their own subscription or bundle by selecting which products they want to buy and choosing the frequency. ...
1
vote
1answer
68 views

getDirtyAttributes() not showing changes

I've got an event listener in a custom plugin where I want to check to see if the users email updated, but it doesnt show that attribute as dirty, even though I know it should be: Event::on(User::...
2
votes
1answer
48 views

Deleting one or all Assets from a fieldusing a front end form

Good afternoon All, Im trying to setup the ability for users to delete 1 or more of their own images from a multi photo asset field and have got stuck. This is what is have so far, I assumed adding a ...
0
votes
0answers
22 views

Need to populate new field based on existing data

Say I have a section called "Stores" that has an existing field called "Store Hours". The client has populated the store hours for 1000 some stores. Now, however, it seems what the ...
1
vote
1answer
79 views

Use .env values in Craft 3 plugin settings

I’m writing a plugin and need some of its settings to be pulled from the .env file. According to the docs the following should work, but the getter isn’t getting called whenever the plugin’s ...
1
vote
1answer
432 views

WARNING: heuristic fragment matching going on! when querying matrix fields or any query with multiple fragment types with Graph QL using Nuxt Apollo

I am relatively new to using Craft Headlessly and am trying to query matrix fields with Nuxt JS and it's Apollo module. I have discovered, that although the graphQL queries work in the GraphiQl ...
0
votes
0answers
38 views

Url Helper does not create a usable url

When I create a cpUrl like that: UrlHelper::cpUrl($this->entry->cpEditUrl) I get something like that: https://hegi.test/admin/entries/article/7707-test But that don't work inside of the browser. ...
3
votes
1answer
28 views

How to detect the current report in settings.twig

I have several reports to create but their settings are going to be very similar. So I want to use one settings.twig for all of them and detect which report is the current one to show any extra ...

1 2 3
4
5
35