Skip to main content

Questions tagged [craft4]

The tag has no usage guidance.

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

Site not found error when running Craft CMS behind a loadbalancer in a container

I've been asked to deploy a Craft instance via an image in Azure Kubernetes Service, and I'm having a bit of an issue getting the site up and running - we're seeing a "Site Not Found" ...
1 vote
1 answer
20 views

Section: dynamic Entry URI Format

My solution works, but I seem to have some caching issues ... so I'm unsure weather my solution is useful or not? Entry URI Format of Section (Channel): {{craft.entries.id(530).one().uri}}/{slug} ...
0 votes
1 answer
31 views

Use Freeform to pre-fill a PDF

Question says it all I think. We have a freeform form, where a visitor writes down their name and other info. From there a PDF is mailed back to them, and they have some fields to complete, that they'...
0 votes
0 answers
9 views

How to search additional field in single-page app using GraphQL

I have taken over a Craft CMS project from a previous developer, and I'm having trouble implementing a new simple feature on a single-page app, which is to have search queries match recipe ingredients ...
1 vote
2 answers
30 views

Craft 4.8.0 : Hide some entries to a group of user

I have somes entries : POI-1 POI-2 POI-3 I have two groups of users : Group-1 Group-2 Needs : The Group-1 can edit only POI-1 The Group-2 can edit only POI-2 and POI-3 I see that I can set this ...
1 vote
1 answer
15 views

Reduce Api2PDF requests and store the first visit generated file

I have a page that performs a merge of a series of PDF files through the integration of Api2pdf Craft Plugin in a modified and working version for Craft 4. The problem is that the file gets generated ...
1 vote
1 answer
23 views

Change email transport settings based on order site

I've been trying to send Commerce emails via two different domains but I'm having very little luck getting it working fully. In app.php I have something like this: 'mailer' => function() { $...
1 vote
1 answer
22 views

Why am I seeing a version compatibility error after updating Craft Commerce to 4.6.0?

I recently updated Craft Commerce to version 4.6.0, but now whenever I run any Craft commands or navigate to site.com/admin, I encounter the following error: You need to be on at least Craft Commerce ...
1 vote
1 answer
16 views

How to get info about an asset via cli?

I have assets configured via azure blob storage and sometimes one of 2 issues is happening : 01. The asset url remains as /en/actions/assets/generate-transform?transformId=45 In this case i would ...
1 vote
2 answers
31 views

ImageTransform Focal Point Cache Busting

I have a Question about image transform focal point behavior. Twig templating or with php. Getting the url of an asset with a transform $asset->getUrl('transformer') If i am understanding the ...
1 vote
1 answer
45 views

Slug: German "Umlauts" (beyond limitAutoSlugsToAscii) // db storage

Is there a chance to avoid German "Umlauts" (äöüß) for the slug? I'm aware of this: https://craftcms.com/docs/4.x/config/general.html#limitautoslugstoascii But the editors can edit the slug ...
0 votes
1 answer
70 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 ...
1 vote
1 answer
98 views

Upgrade from 4 to 5 error

When running the php craft up command as one of the last steps for the upgrade I get the following error. *** applying m230511_215903_content_refactor Exception: A field layout element has a duplicate ...
0 votes
1 answer
133 views

Redactor no longer maintained

What is a recommended alternative to the redactor plugin? Or just use it anyway? Cheers, Joe
1 vote
2 answers
37 views

Can I search multiple element types in one query?

Yup, this is a repeat of a question from 7 years ago. The github discussion seems to have died out 2 years ago. I can't do weird array merging due to pagination which accepts an element query. So it ...
0 votes
0 answers
17 views

Query relatedTo category or empty field

I'm not able to query a list of items relatet to a category or if category field is empty in the same query. I have to make two and merge them. Is it not possible? This works: {# Fetch entries related ...
0 votes
0 answers
21 views

Image Transformation causes error 503

I have too many images on a overview page, and it kills the server which creates a error 503. I converted all source images to less than 1MB, but it still crashes the server. (Using Imager X on craft ...
1 vote
1 answer
46 views

Running Craft on a subpath

We are trying to run Craft CMS not under example.com but under example.com/subpath. So we want the following paths: Frontend: example.com/subpath controlPanel: example.com/subpath/admin In the .env ...
0 votes
0 answers
39 views

Queue process fails with unclear error ouput

I have a custom job queued, which in itself writes to the logs that the thing it is doing has been done successfully, however if I check the result in "Utilities" > "Queue Manager&...
2 votes
2 answers
33 views

How do I authorize/register visitors on the site?

I use Craft CMS 4. Please tell me, is it possible to authorize users in Craft CMS? In general, the goal is this: I want to show some elements on the site only to authorized users. For example, ...
1 vote
1 answer
40 views

"entry.isEditable()" not working on Craft CMS 4

Do the "isEditable" property of Entry still exists? Whats the best way to achieve the same functionallity in Craft 4? {% if entry.isEditable() %} After I upgraded from Craft 3 to 4, all my &...
1 vote
1 answer
26 views

Member/ User portal integrate with Dynamic 365

I am looking for a solution to integrate my Dynamic 365 Database with CraftCMS Front-end user. I have done some digging for how Dynamic 365 can integrate, but seems like it is limited at form (https://...
0 votes
0 answers
49 views

Unable to Upgrade Plugins in Craft CMS 4.8.0

In Craft CMS version 4.8.0, there is an issue preventing the successful upgrade of installed plugins using the command php craft update (plugin). Interestingly, when upgrading the plugin on an older ...
1 vote
1 answer
27 views

4.8.0 - How to avoid singles content to be duplicated accross all sites

How to avoid singles content to be duplicated accross all sites ? What are the best propagations rules in the single section and the fields ?
0 votes
0 answers
21 views

How to create a matrix style field in a custom plugin

I'm building a custom plugin for Craft CMS 4 that has a form where users can add and remove a list of products. Every product has a title and a price field. Other fields have been created like this: {{...
1 vote
2 answers
112 views

Unable to install plugins in Craft 4 production

I am upgrading from Craft 2 to Craft 4 and this is the first time I'm deploying a Craft 4 website. It was entirely unclear how to do this, as just uploading the files to an FTP server does not work ...
1 vote
2 answers
30 views

Webhook only firing when I log in

I've set up a Webhook in Craft 4 that triggers a Zap. The Sender class is craft\commerce\elements\Subscription and the event name is afterSave. When the trigger action happens (a user subscription), ...
0 votes
0 answers
24 views

Populating Field value with javascript resulting data not saved

trying to make an event that populating Text into Doxter Field when certain field is change, But on success populating there is weird saving behaviour occurs, if we save entry by using Save Button ...
0 votes
1 answer
68 views

Craft CMS and Craft console

I have installed Craft CMS on a server, and I'm admin. I opted to the Pro version trial for 14 days. I am now trying to pay for the Pro version and it is sending me to the craft console, yet I can't ...
0 votes
0 answers
39 views

Freeform v 5.0.6.1 Render

I'm using "craftcms/cms": "4.7.1", My form does not render since I updated to the new most recent version of freeform "solspace/craft-freeform": "5.0.6.1", is ...
1 vote
1 answer
118 views

Content Migration in Craft 4

We are presently working on content development on the staging site. Once UAT is complete and approval is obtained, we intend to transfer this content to the production site. However, we have ...
1 vote
1 answer
46 views

after deleting some sites and sites-goup i get a php warning "Undefined array key 2"

I deleted some sites and also a site-group i did'nt need anymore and now getting a php warning "Undefined array key 2" and i can not open entries anymore. seems that group id (or site ids) ...
0 votes
0 answers
26 views

Is there any events to trigger for inserting data into orderAdjustment table

I'm implementing a module to integrate a third party gift voucher into the craft cms application. For that I need to trigger the order Adjuster every time the cart gets updated. TIA
1 vote
2 answers
36 views

Which field types are supported with a submit entry on Craft 4

I'm working on a front-end entryform and wondering which field types are supported with the default controller ({{ actionInput('entries/save-entry') }}). Title and plain text fields are working but ...
1 vote
1 answer
48 views

Could not generate a unique URI based on the URI format

We have a section of products. Their title is always the raw ISBN Number. I think this makes it hard for craft to auto increment them. Example: But this is not the main problem. Since some update, ...
0 votes
0 answers
24 views

Save entity data from code

I am trying to save entries data from code, but it's only working sometimes. Can you check what's wrong? $transaction = Craft::$app->getDb()->beginTransaction(); try { // Save the ...
0 votes
1 answer
42 views

Ajax fileupload into asset folder (Craft 4)

I am upgrading a clients website from Craft 2 to Craft 4, and I'm stuck at ajax fileuploads to the CP. I'm using fileupload.js for this. In Craft 2 my code looked like this, and I'm struggling to ...
0 votes
0 answers
29 views

Frontend assets upload to folder (Craft 4)

I need to upload files into an asset folder I have created using a frontend form, however I can't seem to get this to work in Craft 4. This is the code I have used: <form method='post' accept-...
0 votes
0 answers
27 views

How to run content migrations when running tests

I added a content migration for my custom Craft module. When running tests, I want the migration to be applied as well (otherwise tests will fail). Therefore I added a migrations directory to the ...
1 vote
1 answer
40 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 ...
1 vote
1 answer
43 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 ...
0 votes
0 answers
18 views

Redirect to /commerce/payments/complete-payment returns 404

I've created a gateway with payment to an external payment provider (offsite). When the payment is successful I need a redirect to complete the order and payment to: /commerce/payments/complete-...
0 votes
0 answers
179 views

Amazon S3/Cloudfront bucket providing "Unable to check if <img> exists" error when uploading an asset

I have just set up my first S3/CloudFront service to handle assets and it all seems to be connected right, but when I upload an asset into the volume that is stored on S3, I get this odd error in ...
1 vote
1 answer
38 views

evaluateDynamicContent() is disallowed

Bug while installing debug toolbar in Craft 4 latest version: An Error occurred while handling another error: yii\base\NotSupportedException: evaluateDynamicContent() is disallowed. in /craft/vendor/...
2 votes
1 answer
52 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 // ========================================================================= /** ...
0 votes
0 answers
27 views

Craft advanced routing is not working

this is my ContactController.php in controller/ folder. <?php namespace controllers; use craft\web\Controller; use yii\web\Response; class ContactController extends Controller { public ...
4 votes
3 answers
525 views

Craft 4 upgrade. Entry throwing 'craft\models\EntryDraft doesn’t exist' error in admin

After upgrading to Craft 4 a few entries are throwing this error in the admin (Locally): craft\models\EntryDraft doesn’t exist or doesn’t extend/implement craft\base\ElementInterface Not all do this ...
0 votes
0 answers
16 views

Is Worldpay craft plugin integrates Cybersource

I'm kinda new to payment gateways, Is the craft commerce-worldpay plugin https://plugins.craftcms.com/commerce-worldpay integrates Cybersource as stated in this worldpay docs https://developer....
0 votes
0 answers
67 views

CRAFT_WEB_ROOT incorrect when trying to "Move Craft’s Files Below the Webroot"

I'm having trouble deploying a project: My web hoster automatically generates vhosts for each domain, with their respective webroot being /var/www/myuser/mydomain.com/; so I followed the Moving Craft’...
0 votes
1 answer
58 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 ...