Skip to main content

Questions tagged [craft4]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
24 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} ...
Marc 's user avatar
  • 194
0 votes
0 answers
22 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" ...
Zhaph - Ben Duguid's user avatar
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 ...
cjhdev82's user avatar
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 ...
Milksamsa's user avatar
  • 145
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 ...
emilie zawadzki's user avatar
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() { $...
Jamie's user avatar
  • 121
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 ...
Mostafa Soufi's user avatar
1 vote
1 answer
17 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 ...
MRARGT's user avatar
  • 11
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 ...
Leonardo's user avatar
  • 471
1 vote
1 answer
102 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 ...
Matthias's user avatar
  • 301
1 vote
2 answers
38 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 ...
Amanda Lutz's user avatar
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 ...
Tibbe's user avatar
  • 131
0 votes
1 answer
145 views

Redactor no longer maintained

What is a recommended alternative to the redactor plugin? Or just use it anyway? Cheers, Joe
analog junkie's user avatar
0 votes
0 answers
23 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 ...
KSPR's user avatar
  • 3,786
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&...
7ochem's user avatar
  • 165
2 votes
2 answers
34 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, ...
Dimi's user avatar
  • 305
1 vote
1 answer
41 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 &...
Atimoda's user avatar
  • 31
0 votes
0 answers
51 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 ...
Selva's user avatar
  • 11
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 ...
Leonardo's user avatar
  • 471
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: {{...
Matthias's user avatar
  • 301
1 vote
1 answer
28 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 ?
emilie zawadzki's user avatar
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 ...
Nixxian365's user avatar
1 vote
2 answers
117 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 ...
Branko's user avatar
  • 13
1 vote
2 answers
31 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), ...
Graham Bennett's user avatar
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 ...
Gilbert Louis's user avatar
0 votes
0 answers
40 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 ...
Johanna Maldonado's user avatar
1 vote
1 answer
128 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 ...
Selva's user avatar
  • 11
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) ...
Henrik's user avatar
  • 425
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
Gowri Shankar's user avatar
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 ...
Maarten Heideman's user avatar
1 vote
1 answer
27 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://...
Michael's user avatar
  • 11
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, ...
Leonardo's user avatar
  • 471
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 ...
Syeda Nusraht Khaledur's user avatar
0 votes
0 answers
31 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-...
Branko's user avatar
  • 497
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 ...
Branko's user avatar
  • 13
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 ...
Boris's user avatar
  • 41
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-...
user3086053's user avatar
0 votes
0 answers
188 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 ...
Jay's user avatar
  • 1,042
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/...
user3086053's user avatar
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
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'...
Ebpo's user avatar
  • 113
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 ...
Syeda Nusraht Khaledur's user avatar
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....
user2226937's user avatar
0 votes
0 answers
69 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’...
kindoflike's user avatar
1 vote
0 answers
38 views

Run function after "Save Draft" but don't run if it autosaveDraft?

Since CRAFT_AUTOSAVE_DRAFTS=false was deprecated in Craft 4, and actually this method also affect some Craft functionality. i want to know if there another method or event that will run myfunction ...
Nixxian365's user avatar
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 ...
Odin's user avatar
  • 1
1 vote
1 answer
131 views

Migration failed - table already exists

I'm stuck in a "migration" that is trying to install a table which it clearly didn't check for (because yes, it is quite already there.) When I remove the table and allow the migration to go ...
Caroline Blaker's user avatar
1 vote
1 answer
24 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 Moderator Added from Comments: I need to filter the events ...
user14621's user avatar
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 ...
Ana Viana's user avatar
1 vote
1 answer
86 views

Craft 4 DB connection works in WEB context but not from Craft's console command

We just completed an upgrade from Craft 3 to 4 (latest version) and now all web requests (FE+CP) work, but not the console commands, it can not connect to the database ./craft users/list-admins ...
Matthias Redl-Mann's user avatar