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
0 answers
12 views

How to batch delete obsolete PDF files from site assets

I inherited a CraftCMS project and there are currently close to 1200 obseletes pdf documents, still present in the site assets. The documents are stored in an S3 Bucket. What is the best way to do ...
PatCraft's user avatar
1 vote
1 answer
20 views

Error when calling renderPdfForOrder() in Module

The error I'm receiving is: Call to a member function getRenderLanguage() on null My Code (Edit - simplified): $mergeService = new Merger(); $batchFileName = 'VAT-' . $country . ( $date ? '-' . $...
cherrykoda's user avatar
  • 1,059
1 vote
1 answer
33 views

Eager-loading content and merging queries

sorry if the following question is too basic, but I've spent quite some time digging now so I decided to reach out for help. Is 250 DB queries too many? I have a Neo field "modules" that can ...
Roman Sobkuliak's user avatar
1 vote
1 answer
31 views

Can't use matrix.one() and matrix.all() at the same page

i try to get blockMatrix value with different way(.one() & .all()) in the same page (this page consists of several templates) but the result is weird. Here how i do it: i have a blockMatrix("...
Nixxian365's user avatar
1 vote
1 answer
39 views

Event on new user created

please can someone help me with this snippet of code I have written. I basically would like to check if a user is new. However, the below only triggers when an existing user is saved, not when a new ...
Mark's user avatar
  • 731
2 votes
1 answer
75 views

Deployment strategy that removes tables from uninstalled plugins

I have read the following article best practices for deployments. https://craftcms.com/knowledge-base/deployment-best-practices here the following is recommended: git pull composer install php craft ...
antdev's user avatar
  • 135
1 vote
1 answer
31 views

How to get field values by specific field type from all Entries?

I am trying to get all values of a specific field type from all entries. (ex.: craft\fields\PlainText) Is there an easy way to get these values ?
antdev's user avatar
  • 135
0 votes
0 answers
17 views

Set entries section to orderby date entered

I have a page on a site that is showing entries with this code: {% extends '_layouts/default.twig' %} {% macro productItem(product) %} {% set filterClasses = [] %} {% for material in product....
rudtek's user avatar
  • 169
1 vote
1 answer
30 views

Craft 3 / 4 CP: Restrict users to specific user groups in Users view

I need to restrict access to users (not entries) of say AdminGroupA to be able to access and manage users of UserGroupA in the Control Panel. Right now, the user AdminGroupA can browse all of the ...
biko's user avatar
  • 670
1 vote
1 answer
29 views

Why does my redis keep shutting my site down

I uploaded a new site (migrated) to a new server. 3 times now I've had my redis maxout memory. This causes my site to show an error 500. When I flush the redris the site goes back up immediately. I ...
rudtek's user avatar
  • 169
1 vote
1 answer
89 views

Can't Update CraftCMS

I'm currently using Craft CMS 3.7.9. When I go into Utilities -> Updates (which shows a 5 so there must be updates), a red message appears at the top that says "A server error has occurred&...
Jake1293's user avatar
  • 159
2 votes
1 answer
49 views

_layouts/cp.twig cannot be found

I have a module that's meant to add a section to the CP. class Reports extends Module { // Public Methods // ========================================================================= /** ...
cherrykoda's user avatar
  • 1,059
0 votes
0 answers
64 views

Amazon S3 Setup for Craft 3

I'm attempting to setup a craft site with AWS S3/ Cloudfront. I found this tutorial (from some time ago): https://nystudio107.com/blog/using-aws-s3-buckets-cloudfront-distribution-with-craft-cms I'm ...
rudtek's user avatar
  • 169
0 votes
0 answers
26 views

Getting an internal server error on an inherited Craft 3 site

I was asked to host a Craft site, my client knows I've never done it before and is letting me explore a bit. The file that were sent over were customized, so I'm mucking through it. I uploaded the ...
rudtek's user avatar
  • 169
1 vote
2 answers
140 views

Stop customers from increasing line item

I have a site where the owners want to stop customers from ordering more than 1 type of item. The Twig logic is already in place to stop any forms showing that would allow customers adding more than ...
Jaytrix's user avatar
  • 187
0 votes
0 answers
55 views

Multiple errors attempting to migrate MariaDB Craft CMS 3 database to PostgreSQL via pgloader. Alternatives?

I've been at this for a couple days now and it's not looking good. I'm trying to migrate a Craft CMS 3.9.5 (latest) database running on MariaDB to Postgres using pgloader 3.6.10. I've attempted this ...
CBallenar's user avatar
  • 111
1 vote
1 answer
98 views

Session token error/missing after server switch

I am duplicating a Craft 3 site from a production environment to a dev environment (local with MAMP Pro). On the "new" dev site I can't log into the control panel. The credentials are valid ...
Kirk Roberts's user avatar
1 vote
2 answers
62 views

Cleaning up twig query with nested and/or where

I have troubles understanding the nested twig query syntax. It works fine in PHP code but somehow when using twig I never seem to get it right. This is my raw, dirty query which I want to clean up a ...
bartpulse's user avatar
1 vote
1 answer
81 views

I have an existing project called Craft cms v3.3, what should I do if I want to run it at local?(Mac OS)

I currently have a project that is definitely craft cms v3. I want to run it but this is the first time I keep stressing over it. Please help me
Phan Dương Ngọc Đô's user avatar
1 vote
1 answer
165 views

Craft 3 DDEV Migration: "No database has been selected yet"

I've hit a snag while trying to move my Craft 3 project from MAMP to DDEV. First I installed a new DDEV project using the php project type and MySQL 8.0 for the database. Then I imported the database ...
kmgdev's user avatar
  • 1,169
1 vote
1 answer
125 views

Updated to PHP version 8.1.22 and one of my Craft 3 sites is getting a critical error

I upgraded my server to PHP 8.1.22 in order to start a new Craft 4 site, and one (but not all) of my existing Craft 3 (3.6.17) sites is giving me the following error. How do I resolve this error? See ...
Justin Kendall's user avatar
1 vote
0 answers
40 views

Bulk Entries Migration works on local, but not updating elements in production

I'm trying to bulk update records based on a condition but the entries are NOT getting updated even though the migration seems to go through. Both code samples below work locally but NOT in production ...
CBallenar's user avatar
  • 111
1 vote
1 answer
91 views

How to extend or override CP template?

I need to add some custom condition to the top siteMenu selector. Template file with top menu: vendor/craftcms/cms/src/templates/_elements/sitemenu.twig Block with this menu: vendor/craftcms/cms/...
DuxaBilii's user avatar
0 votes
1 answer
29 views

Upgrading to Craft 3.7 errors

i am trying to upgrade one of my sites up from Craft 3.6.17 to 3.7 and if i try and upgrade at all i just seem to get the following errors: Any ideas what I need to do? Database Exception: SQLSTATE[...
Malcolm Maclean's user avatar
0 votes
0 answers
38 views

Prevent user email validation message showing twice In craft panel

When i enter same email which is already exist and click on save it is showing twice message. Can you please tell me it is craft cms's behavior? I have checked by disable custom modules and also ...
developer's user avatar
0 votes
0 answers
43 views

Changing Matrix Field Propagation Settings

I built a Craft multisite a few years ago. Most of the site pages feature a content builder matrix field with multiple blocks. Many sections are shared across sites. When I built the site, it seemed ...
JDub25718's user avatar
1 vote
1 answer
47 views

Big upgrade completed locally, how to upgrade live?

I have a site that was Craft 3.4 and Commerce 3.x (unsure of exact version). Locally, I've been spent a big chunk of today updating to the latest versions of everything and making sure all still works ...
Jaytrix's user avatar
  • 187
0 votes
1 answer
36 views

Redirect control panel access via .htaccess

I have a website that is hosted on a subdomain, let's say: https://subdomain.maindomain.nl. My craft content is in the maindomain/public_html/subdomain/git-module To make it work on the subdomain I ...
divv's user avatar
  • 1
1 vote
1 answer
28 views

I want to pull content from a field on an entry into a matrix block that is displayed on that entry, is this possible?

I want to pull content from a field on an entry into a matrix block that is displayed on that entry. I have entries that are shared between multiple sites. I'd like to be able to add a field on these ...
Sean G's user avatar
  • 11
1 vote
1 answer
142 views

How to completely disable entry versioning(drafts) during editing

Obviously I disabled it in the section settings: I just want to save the entry after making all the changes, but now it's trying to save the revision after each single change
Nikolay Bronskiy's user avatar
0 votes
0 answers
32 views

Is there a way to expose User edit history in Control Panel (similar to Entries)?

"Users" version should work like "Entries" versioning work
arshit kalkani's user avatar
1 vote
1 answer
43 views

It's possible to display "User" menu history like "Entries" menu history on admin dashboard

Or, Is there any way to modify the recent entries widget and display user history in the same widget
arshit kalkani's user avatar
1 vote
1 answer
47 views

How to differentiate between draft versions in ModelEvent?

craftcms/cms : 3.6 First create new entry and it store as draft then i publish this entry then create a new draft version of this published entry so how to differentiate this is first draft or second ...
arshit kalkani's user avatar
1 vote
1 answer
97 views

Syntax for URL route instead of using url parameter

I'm confused by the syntax for URL routes. Using Craft 3. I'm working with two separate category groups and have urls like this: site.com/?parameter=123 site.com/abc?parameter=123 site.com/abc/xyz?...
Jake's user avatar
  • 43
1 vote
1 answer
562 views

How do I solve "Unknown Property – yii\base\UnknownPropertyException Setting unknown property: craft\fields\Assets::branchLimit"

First of all I am new in CraftCms. I am trying to run the project local which I cloned, so I have a database which I must import to this project. now its giving this error when I finish importing the ...
blessing Jackson's user avatar
0 votes
0 answers
39 views

How to list categories only related to enabled entries or disabled child entries

Edit: solved in comments My entries are set up as a parent > child structure. A single entry can either have children or not have any. If parent has children, the children entries are put in a ...
Jake's user avatar
  • 43
1 vote
1 answer
22 views

Can't disable entry versioning

I've got a page with: 15+ sites (are used for serving different languages), a structure with matrix blocks and super table blocks inside them. It took almost a minute to save an etnry, so I disabled ...
anvar's user avatar
  • 67
0 votes
0 answers
34 views

Interface "React\Promise\ExtendedPromiseInterface" not found

So I upgraded the page from Craft 2.9 to latest 3.x.x version. Now I am trying to install a plugin and I get this error - any help? Cheers
Zoruak's user avatar
  • 11
1 vote
2 answers
41 views

Help building a query with related to

I'm trying to create an or query with 2 related fields and 1 title field. My version so far is this: $searchQuery->where([ 'or', ['relatedTo', 'targetElement' => $ids, 'field' => '...
bartpulse's user avatar
0 votes
0 answers
78 views

Duplicate entry '2022' for key 'categorygroups_sites.PRIMARY'

I'm trying to get a live site running locally (using DDEV) and having trouble importing the database. The database is an export from the live site (which is running and has been for a short time). ...
Jaytrix's user avatar
  • 187
0 votes
1 answer
30 views

Site breaking when I call a custom module up on app.php file

My Craft CMS version 3 site is breaking when I boostrap a custom module up on app.php file. The code looks like this: <?php use craft\helpers\App; return [ 'id' => App::env('APP_ID') ?: '...
Sean G's user avatar
  • 11
1 vote
1 answer
438 views

New to CraftCMS and linking to an existing project using DDEV

The business I work for has just acquired another business whose CMS is CraftCMS. So am totally new to CraftCMS and how it operates. At the moment am finding it a steep / challenging learning curve. ...
daolwede's user avatar
0 votes
0 answers
53 views

Import Image on Matrixblock via GraphQL Mutation

I'm trying to create an Entry via a GraphQL mutation. The whole Entry consists of one Matrix(handle: siteimportmatrix ) with one Block(handle: importblock ) which has 4 fields one of the fields is an ...
Maximilian Enzinger's user avatar
2 votes
1 answer
182 views

How to use ajax call to retrieve data from craft cms entries to use in php application

I'm building a static webpage with php and Javascript. I have setup all my data in craft cms entries. I want to use ajax to retrieve the data from craft and just display it on my webpage. How do I do ...
Alyx's user avatar
  • 23
0 votes
0 answers
43 views

Error when creating new entry! HTTP 404 – Not Found – yii\web\NotFoundHttpException

Any help is appreciated! I just downloaded and setup craft using composer. I went to create my first blog entry, and as soon as I click "New Entry" I get this error. Setup went smoothly and ...
Alyx's user avatar
  • 23
1 vote
1 answer
57 views

Deleting matrix block on front end form

The below code doesn't appear to be working for me, it will delete all other blocks apart from itself. I just need it to delete itself. trophyOrders is the Matrix field in the user account. {% set ...
Mark's user avatar
  • 731
1 vote
1 answer
74 views

Update user matrix field dropdown through module

Appreciate I may be asking for a lot here - I have an existing module that I use to fire events when a stripe order is completed. I would like to iterate through some User matrix blocks and update a ...
Mark's user avatar
  • 731
0 votes
0 answers
20 views

Survey Question - Not Seeing Success Message

I am creating a survey for a client but when testing the survey, I am having trouble getting the Success Message or Error Message when complete ("Thank you for taking the survey" or "...
adrienne's user avatar
1 vote
2 answers
49 views

Upgrading from Craft 3.7.1 to 3.7.19

I've been working through my long overdue updates. I'm now trying to go from 3.7.1 to 3.7.19 (note: I stop at increments that the CP Update list shows an "update warning triangle"). The ...
Unlimited's user avatar
2 votes
1 answer
145 views

Upgrading from 3.49 to Craft 4, Incrementally

We have a site that has been in production for a while and finally have been given the task of upgrading to Craft 4. We are at Craft Pro 3.4.29.1. Can I upgrade the site in stages? i.e. from 3.49 to ...
Unlimited's user avatar

1
2 3 4 5
39