Questions tagged [craft4]

The tag has no usage guidance.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

how to add an if to open an external link in the menu

I have a code that I am using to make the menu I created in Craft CMS work. In my menu, I have direct and indirect links. and I also have a child option that uses an EXTERNAL link. In other words, the ...
Ana Viana's user avatar
1 vote
0 answers
32 views

How to detect when a custom Field's element is being hard deleted?

With a custom Field how do you detect before the element associated with the field is hard deleted not just before it is soft deleted (beforeElementDelete) and added to the trash.
a-am's user avatar
  • 2,857
1 vote
0 answers
78 views

Craft4 Upgrade did not create filesystem entries

I'm making a post about this as a form of documentation of an issue I ran into while upgrading one of my sites to Craft4. I followed the upgrade instructions and got the site upgraded to the latest ...
Rick Kukiela's user avatar
1 vote
0 answers
42 views

cannot create matrix in craftcms 4.2.3

I just created a fresh project with craftcms 4, but am running into issues creating a matrix. Even with just one block field. It gives me the error Cannot assign string to property craft\models\...
jbrightdev's user avatar
0 votes
0 answers
11 views

Error on plugin settings page: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

I've installed the latest CraftCMS version via composer. When I'm visiting the plugins settings page (/web/admin/settings/plugins), I get the following error message: preg_replace(): Passing null to ...
Odin's user avatar
  • 1
0 votes
1 answer
13 views

How to call and print only Event Types of Event Plugin

How to call and print only Event Types (title and handle of event types) of Event Plugin -> https://verbb.io/craft-plugins/events/features
user14621's user avatar
0 votes
0 answers
14 views

Setting title in Instant Analytics GA4

I’ve installed Instant Analytics GA4 (https://nystudio107.com/docs/instant-analytics-ga4/) The default title is the template (which is a bizarre default IMO) as a result all of my analytics are ...
mitrol's user avatar
  • 252
0 votes
1 answer
44 views

Transfering content from my local docker environment to production

For the second time, I've created a website with CraftCms. This time, I used my windows computer to setup the project but I had to use docker. Fyi, I'm not experienced with docker, but I was ...
Stef Verniers's user avatar
0 votes
0 answers
19 views

I get a 404 not found when going to my site url, but content will show when navigation to url/craftfolder/web

I've made for the second time a craftCMS website. But is goes wrong at the deployment. After many times of trying, I got it kinda working when going to siteurl/craftfolder/web. In that case the ...
Stef Verniers's user avatar
0 votes
0 answers
44 views

composer update for Craft 3 to Craft 4

Trying to migrate a site from Craft 3 to Craft 4. Carefully followed the instructions to update my composer.json file to reflect the Craft 4 versions of Craft and all plugins. When I run composer ...
Roi Agneta's user avatar
  • 1,413
0 votes
0 answers
27 views

Disable specific search syntax with colon

I have a search page which searches in products. Unfortunately some of these products contain a colon : in the title. This triggers the search syntax that is built into Craft. How can I disable this ...
Matthias's user avatar
0 votes
0 answers
63 views

Content revision issue for every code deployment

The content reversion issue was reported during the production deployment of a new module on the Craft CMS site. To address this issue, we suspect the below deployment scripts are causing the content ...
JohnC's user avatar
  • 61
0 votes
0 answers
23 views

Does descendantOf only accept a single value?

I have a products page on which I'm filtering with Sprig. There are some categories in the form of checkboxes. These categories have some subcategories. The categories are a structured section with ...
Matthias's user avatar
0 votes
0 answers
25 views

Feed me with Google sheets and matrix fields

Our client delivered a list of products in the form of a Google Sheet. Some products contain some extra information which should we presented in the form of a list on the website. Currently these ...
Matthias's user avatar
0 votes
0 answers
24 views

Codeception Unit test using fullMock

I have a custom field for which I would like to write some basic unit tests. I was looking into fullMock: true since really don't need a full Craft environment. I want to test the normalizeValue() ...
thomas's user avatar
  • 131
0 votes
0 answers
18 views

How to adjust entry fields to have different width based on field value in Craft CMS 4

I have created a entrytype where there are multiple sets of fields. One for each of 4 different languages. In the entrytype i have selected a field of checkboxes and added conditional logic for which ...
Coledevelopment's user avatar
0 votes
0 answers
55 views

Craft cms[4.x]: Frontend Site broke after performing a feed with feed me

On our last data migration from wordpress i import through feed me all the data but the postDates. 31-08-2023 11:12 I imported a csv file in feed me with all the posts content including the postDates ...
Adam Fernandez's user avatar
0 votes
0 answers
25 views

Disable URL's for nested levels in structure but keep URL's for the 2 top levels

I have some products with categories that go 4 and sometimes 5 levels deep. The site will have an overview page for the first 2 levels. For example: my-website.com/category/subcategory I have created ...
Matthias's user avatar
0 votes
0 answers
24 views

Live preview button(s) gone after enabling different domain for control panel

I'm building a Craft website which will need another domain for the control panel. The setup for this has gone good using this article. => https://craftcms.com/knowledge-base/access-control-panel-...
Matthias's user avatar
0 votes
0 answers
18 views

CP routes are suddenly prefixed by /web/ directory

I've deployed my website for a second time but there is a problem now.. When I navigate through my page, everything works fine apart from one page that fetches a graphQL query, but this returns an ...
Stef Verniers's user avatar
0 votes
0 answers
25 views

Unable to list entries in site where section type is not available

I am using Craft CMS 4 latest. I have a NeoSections field that among others contain a field called entries that has one or more entries in it. I am running a multisite with 8 sites in 4 site groups. ...
nitech's user avatar
  • 679
0 votes
0 answers
32 views

Prioritising Paid Authors In Entry Queries - Craft 4

I have a Craft CMS 4 website with an entry query that's displaying results in order of priority (1, 2, 3 or 4) and sub priority (1, 2 or 3). I've assigned these numbers to the entries via entry fields....
George Bleasdale's user avatar
0 votes
0 answers
58 views

In Craft 4, how can I disable the SSL local issuer certificate verification for any cURL requests?

In Craft CMS 4, for testing purpose only in a local environment, how can I disable the SSL verification (probably using verify_peer and verify_peer_name set to false) to all cURL requests, and ...
Romain P.'s user avatar
  • 1,798
0 votes
0 answers
31 views

Multilingual site - how to do continuous translation?

We are making a site multilingual. It will have multiple geographical target areas as well as multiple languages per location. How can we cause ourselves the least amount of pain when constructing the ...
nitech's user avatar
  • 679
0 votes
0 answers
130 views

Error while trying to create Assets/Asset Volumes

If I try to create a asset field, a server error occurs when I select the Field type "Asset" and I can't edit it further. I also can't edit my Assets because when I click on it I get an ...
Lucas's user avatar
  • 1
0 votes
0 answers
90 views

SQLSTATE[HY000]: General error: 5 Out of memory (Needed 418490224 bytes)

I'm building a webtoon with CraftCMS 4 but facing this issue: SQLSTATE[HY000]: General error: 5 Out of memory (Needed 418490224 bytes) Screenshot: https://i.stack.imgur.com/oMKud.png All entries are a ...
Alex's user avatar
  • 1
0 votes
0 answers
56 views

Stripe 3D secure screen does not appear for subscriptions

I got a website with a subscription service. I have Craft V4 and Craft Commerce V4. When I am paying the subscription with a classic stripe test card, it is working well. But when I am paying the ...
Miguel Bocquier's user avatar
0 votes
0 answers
57 views

Github Codespace CraftCMS Headers sent error

I am trying to setup a Github Codespace env with PHP and MySQL to run CraftCMS 4. Everything works fine from PHP/MySQL side and I was also able to install all CraftCMS dependencies using composer and ...
mooonli's user avatar
  • 111
0 votes
0 answers
83 views

Programmatically change value of plaintextfield in matrixblock on Entry presave Event

I'm new to craft cms and try to write a module which should hook into the EVENT_BEFORE_SAVE and change the value of a plaintext field within a matrix block. Therefore I've set up the Module just like ...
Maximilian Enzinger's user avatar
0 votes
0 answers
121 views

Debugging slow loading Control Panel (and front-end too)

Craft CMS take a very long time to load, sometimes over 5-6 seconds (in my local environment WAMP). Profiling with Yii Toolbar I can see that (a page in the Control Panel) : The site is running ...
fr123's user avatar
  • 1
0 votes
0 answers
58 views

Saving tags via front end entry form - craft cms 4 and selectize.js

I have a front end entry form that allows users to update their entry. I have created a tag field using selectize.js that displays the existing tags for that entry, allows the user to enter their own ...
George Bleasdale's user avatar
0 votes
0 answers
80 views

Feed Me: import Assets custom fields data while importing new Entries

I have a JSON feed that import new Entries. In the imported fields, I have an image Assets field which is set up to create assets from their URL. "cover": [ { "url": "...
Romain P.'s user avatar
  • 1,798
0 votes
0 answers
40 views

Trouble with channel URLs and CSS files not pulling through - Craft CMS 4 Multisite

I'm building a multisite on Craft CMS 4 and I'm having trouble with channel URLs. At the moment I'm working locally and then pushing it to the hosting via github. I've created a folder for each site ...
George Bleasdale's user avatar
0 votes
0 answers
51 views

"Craft Isn’t Installed Yet" Error - Asset Indexes

I have a Craft 4 site — all working fine. If I go to Utilities > Asset Indexes > Update Asset Indexes, I get the following error: "Craft isn’t installed yet." Clearly, this is not the ...
mitrol's user avatar
  • 252
0 votes
0 answers
158 views

getDiscountByCode(): Argument #1 ($code) must be of type string, null given

I migrated to craft 4 according to the migration guide and everything went well. Steps to reproduce Migrate to craft Add something into the cart On the Cart template there is the following error on ...
KSPR's user avatar
  • 3,776
0 votes
0 answers
85 views

Set maximum quantity at the product level

I am trying to figure out a way to set a maximum quantity at the product level instead of on the individual variants. The specific use case is selling tickets to events, where my client needs to be ...
Peter U's user avatar
0 votes
0 answers
257 views

Craft 4 install error at craft/migrations/install

I'm trying to install a fresh copy of Craft 4. The following error: message: "An error occurred while executing the \"craft\\migrations\\Install migration: rename(): The first argument to ...
Eric's user avatar
  • 1