Skip to main content

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
29 views

Reduce Unnecessary Database Entries in Craft CMS After Changing Propagation Settings

In one of our Craft CMS projects, we have accumulated around 100 subsites over the years. This has resulted in a large number of unnecessary database entries due to incorrect propagation settings. Our ...
Stefan Prammer's user avatar
2 votes
1 answer
32 views

Craft 3 site – users suddenly cannot login to back-end

I built a site with Craft 3 in 2018. I have barely touched it since (or worked with Craft, to be honest). The front-end is fine and the end-users have been using it without problem until last week ...
Philip Buckley's user avatar
0 votes
0 answers
19 views

No plugins will install on cloned site - Craft 3

I am in the process of cloning a Craft 3 site to a new server (from GoDaddy to SiteGround). I have set up the new craft space and imported the database, assets, templates, etc., which all went ...
Justin Kendall's user avatar
1 vote
1 answer
36 views

How can I display a message to the user that the field is filled in incorrectly?

I have a form: <form method="POST" enctype="multipart/form-data"> {{ csrfInput() }} {{ actionInput('families/families/start') }} <input type="text" name="...
Dimi's user avatar
  • 325
0 votes
0 answers
11 views

Dynamic recipient in Freeform plugin Pro

I'm trying to set up a process with Freeform and I haven't managed to do it. I'd like your input on feasibility. To prevent spamming, I don't want content editors to add email addresses in plain text ...
PatCraft's user avatar
1 vote
1 answer
56 views

How can I check the size of the file uploaded via the form?

I have a simple form on the website: <form method="POST" enctype="multipart/form-data"> {{ csrfInput() }} {{ actionInput('families/families/start') }} <input type="...
Dimi's user avatar
  • 325
1 vote
2 answers
56 views

How can I add an element with an image to a section from the site?

please tell me how to add an entry that contains an image to the desired section. I use Craft CMS 4.9.6. At the moment, I have a form on my website: <form method="POST"> {{ ...
Dimi's user avatar
  • 325
0 votes
0 answers
23 views

500 Status error with Devmode Off

My site loads perfectly fine when I have devMode set to true, but when I keep everything the same except turning devMode to false, it returns a 500 error (probably a server issue). I am really at a ...
Mandy's user avatar
  • 1
1 vote
1 answer
34 views

How to disable X-Rewrite-URL Header in Craft CMS 3?

I'm trying to disable the X-Rewrite-URL header from my Craft CMS site. I have already tried disabling it via the secureHeaders setting in the general settings, but it still doesn't work. Remove 'X-...
Sall's user avatar
  • 11
1 vote
1 answer
27 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
2 answers
23 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,114
1 vote
1 answer
51 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
33 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
57 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
  • 741
2 votes
1 answer
97 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
  • 149
1 vote
1 answer
33 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
  • 149
0 votes
0 answers
20 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
32 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
39 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
165 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
53 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,114
0 votes
0 answers
99 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
36 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
147 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
  • 337
0 votes
0 answers
74 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
153 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
83 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
101 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
254 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,199
1 vote
1 answer
178 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
41 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
118 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
31 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
40 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
50 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
74 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
  • 337
0 votes
1 answer
43 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
31 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
188 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
33 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
48 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
125 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
707 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
40 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
31 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
1 vote
2 answers
52 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
82 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
  • 337
0 votes
1 answer
31 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
628 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

1
2 3 4 5
39