All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
365 views

PHPdotEnv upgrade not working

Updating my Craft CMS website to Craft 3.8 on PHP 8.1 yielded the first of its kind: the fatal deprecation error that would not allow the migration to continue. Turns out, PHPdotEnv v 2.8 is too old: ...
Caroline Blaker's user avatar
1 vote
1 answer
94 views

Payment form differences between Commerce 3 and Commerce 4 in headless application

I'm in the process of migrating Craft Commerce 3 to 4. I handle the payments forms with VueJS, and I've been struggling to understand why my paymentMethod body params were ignored after the migration. ...
Antoine's user avatar
  • 157
1 vote
2 answers
244 views

Neo plugin -> Craft CMS Core ... is this idea still alive?

With a look on https://craftcms.com/roadmap: I remember, there was a ticket to build a Neo alternative into the core of Craft CMS v5 (and a migration tool for existing projects with Neo). ...
Marc 's user avatar
  • 304
0 votes
0 answers
28 views

No option to add Credit Card Details field as a Conditional field

I'm trying to setup a payment integration having some slight issue with the conditional logic on Freeform. I'm on Craft CMS 3.8.12 (Pro Version and Freeform Pro). The form is supposed to have a ...
Armon's user avatar
  • 1
0 votes
0 answers
25 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
33 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
43 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
28 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
8 views

Craft Commerce 3 - two units same shipping cost

I have products which can be put into the same unit when shipping. Eg. If you buy two postcards, shipping costs are still 1x because you can put a lot of postcards in one letter. or you can get two ...
KSPR's user avatar
  • 3,786
1 vote
1 answer
34 views

How to fix an error deprecated error for sourceID

In my CP I'm seeing an error that says: Elements’ getSourceId() method has been deprecated. Use getCanonicalId() instead. It references /storage/ad33d3/www/public_html/templates/jojojo/_sections/...
rudtek's user avatar
  • 169
1 vote
1 answer
32 views

Image Transform not working

I have set transforms in admin but when I call those transforms in Twig nothing happens. 'getUrl('thumb')' shows blank in return although when calling like <img src="{{ asset.getUrl('thumb') }...
Navneet Shukla's user avatar
1 vote
1 answer
32 views

Migrating from Navee (Craft 2) to Verbb Navigation (Craft 3), updating templates

I am migrating a Craft 2 site to Craft 3 and as part of that need to migrate from the Navee plugin to the Verb Navigation plugin. The navigation data import worked fine (Thank you Verbb plugin!), but ...
gstewart's user avatar
1 vote
1 answer
56 views

GraphQL - Behaviours

I have an headless site that is using GraphQL and we have one query that need to do some calculation before returning the results. I was planing to create a behaviours in Craft with a property that ...
Robin Gauthier's user avatar
0 votes
0 answers
19 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
1 vote
1 answer
50 views

Redactor strips out video tags

I’m embedding a video. I have the video button set up for my Redactor field. I use it to insert a video element. When I save Redactor strips the code out and replaces it with an empty figure element. ...
mitrol's user avatar
  • 274
1 vote
1 answer
40 views

Control Panel Missing Items

I just installed a copy of Craft 4.6.0 on a new server. Everything went fine, but when I go to the CP the only options are Dashboard, Utilities and Plugin Store - no Entries, Settings, etc. The site ...
Roi Agneta's user avatar
  • 1,463
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
80 views

What is the best way to automatically add a job (queue) every day?

I would like to add a daily job that updates data. I have the following code: Event::on( Controller::class, Controller::EVENT_BEFORE_ACTION, static function (ActionEvent $event) { ...
antdev's user avatar
  • 149
1 vote
1 answer
61 views

Find all Users with a Custom Field Value in a Plugin

Spent a good amount of time trying to return all Users that match a custom field value. Reading the docs here, it shows a findAll() command. However, when trying the code below, it's not working. use ...
Dario Zadro's user avatar
0 votes
0 answers
221 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
57 views

My secondary site keeps going back to the primary url after changing urls

I have a craft site that was in developement. the main site was linked just to an IP address the secondary site was linked to a url. Everything was working perfectly, I could see each site ...
rudtek's user avatar
  • 169
1 vote
1 answer
44 views

How to extend Craft Commerce?

We're building a webshop with Craft and Craft Commerce. The products will have dynamic pricing based on the weight and material. Is it possible to extend Craft Commerce products to add these fields ...
Matthias's user avatar
  • 301
1 vote
1 answer
58 views

I created a demo site and now want to set live url. How do I do that?

How do I tell craft to change to the new URL?
rudtek's user avatar
  • 169
1 vote
2 answers
65 views

Valid Business Tax ID

Is there a way to check on an order if the Business Tax ID was valid? Craft validates this in the order process, but Im in need of being able to narrow down some logic to orders that have a valid ...
cherrykoda's user avatar
  • 1,114
1 vote
1 answer
53 views

Infrastructure design

For a variety of reasons, we have been asked to look at hosting CraftCMS and our websites on-premises, which I gather is somewhat rare. As the infrastructure guy, I have some basic design questions I ...
Michael Yaeger's user avatar
0 votes
0 answers
22 views

Saving new asset as first index in assets field?

I have a front-end Entry form that has a file input for adding a new Asset to the Entry. It works fine except that I have the special requirement of wanting to add the new asset as the first index in ...
Brimby's user avatar
  • 342
1 vote
1 answer
39 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
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
1 vote
2 answers
40 views

Return all orders from a list of countries in Commerce v3

A little stuck on trying to get the query right for this, I have a module where I need to write a function that returns all orders placed with billing addresses in a selected list of countries. The ...
cherrykoda's user avatar
  • 1,114
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
1 answer
35 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
1 vote
1 answer
46 views

Relations query with OR: Find entries based on (lightswitch = false AND relatedTo()) OR (lightswitch = true) / nested relatedTo?

I have the following challenge: we have a news channel for multiple company locations. Some news should be visible globally (for all locations), but some news are only visible for location X. But ...
m_andrasch's user avatar
0 votes
0 answers
31 views

Rounding Total Price Adjuster Commerce not working correctly

I have this adjuster which should round prices to the nearest 5 decimal. I am pretty sure it had been working, and now it does not anymore. I tried to debug, but I don't find the error. In my commerce ...
Henrik's user avatar
  • 425
1 vote
1 answer
47 views

How to make a quick css edit? and other high level questions from a new user

I am new to this cms platform. I have been asked to make a quick css edit to a website built on this platform. #1 Do I make the css edit in the admin panel of the website , or is there another account ...
ANewUser's user avatar
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
34 views

How can I query for entries of a given type which point to a particular other entry by URI on a particular field?

I can run this query: mySectionEntries(myEntryRelationField: "target-id") { ... } This gets entries from section mySection which point to an entry with ID target-id on the entries ...
tremby's user avatar
  • 165
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
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
77 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
1 answer
47 views

How do i check for customers, not users, in a cart

Using craft commerce 3. I have an adjuster which applies a discount if a user of a certain usergroup. I check this with: $user = Craft::$app->getUser()->getIdentity(); if (($user && ($...
Henrik's user avatar
  • 425
1 vote
1 answer
38 views

User activation mail not working after a while

Does anyone know how much time a user has to use the activation link in the user activation mail? Some clients report to us that that they see an error page after waiting a weekend to use the ...
Matthias's user avatar
  • 301
1 vote
1 answer
41 views

Same File Shared By Multiple Plugins

I'm working in Craft 2, and was wondering if there is a way to share the same file among all of my plugins? Each of the plugins will be reading the same XML file, and, currently, I've only been able ...
buck1112's user avatar
  • 400
1 vote
1 answer
28 views

Linked pages can't load entry-variable

I'm a newbie with Craft CMS and just setup my templates. I got multiple .twig files for six pages. If I load my homepage "from scratch" my entries are shown as I want them to. But if I click ...
Winnie99'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
1 vote
1 answer
48 views

How to get category id of lineItem to use in commerce adjuster

I want to add an adjustment to a product in the basket via an adjuster, only when the product has certain categories. (10% off if there are more than 6 same items in the basket. It's not possible to ...
Henrik's user avatar
  • 425
0 votes
1 answer
64 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
149 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
43 views

How to use the primary locale handle as a fallback in the url?

I'm working on a Craft 4 project with five languages set up as separate sites. The primary site is configured to use 'en-GB' as the language and 'en' as the handle. Currently, when I access the home ...
Mark Notton's user avatar
  • 2,347
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

15 30 50 per page
1
3 4
5
6 7
290