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
3
votes
1answer
27 views

How to detect the current report in settings.twig

I have several reports to create but their settings are going to be very similar. So I want to use one settings.twig for all of them and detect which report is the current one to show any extra ...
0
votes
0answers
41 views

Internal Server Error when updating slug

I'm getting an internal server error when I try to update the my entry's slug on prod, but not on dev or locally. It's happening across entries, it doesn't seem to be specific to a certain entry. Any ...
0
votes
1answer
30 views

currentUser gets cached

I'm having a problem with navigation that seems to get cached. If the page is loaded by someone who is not logged in, it shows the login button in the navigation (and it should). Once the user is ...
1
vote
2answers
25 views

Multiple Listeners (Handlers) on Event

Is it possible to register multiple EventHandlers? I mean something like this: Event::on( Entry::class, Entry::EVENT_AFTER_SAVE,[ NotifyWhenCookPostedArticle::handle, ...
1
vote
1answer
35 views

Hook into Entry::EVENT_AFTER_SAVE when user saves it

I want to send a Mail to an admin, whenever a User of group ‚Cook‘ creates an Entry of Type ‚Recipe‘. For that I created an Event reacting on Entry::EVENT_AFTER_SAVE : Event::on( Entry::class, ...
0
votes
0answers
30 views

WebP-transform doesn't work with >600 pixel height

I am currently playing around with Craft's built-in transform for WebP. I am using GD driver. In general I am able to generate WebP files from my assets. That works well. But it only works up to a ...
2
votes
1answer
33 views

Dynamic URI to load entry template

This may be asking the impossible, but I'm trying to do the following: Say I have 3 channels, Country, Region, and Town. Town has an entry field to select a Region, a Region entry has a field to ...
1
vote
1answer
25 views

Multiple Queries with differing CSS in Paginated output

{% set query = craft.entries.businessAddress(params).orderBy('Premium desc, distance').limit(12) %} {% paginate query as pageInfo, pageEntries %} <div class="row"> {% ...
0
votes
0answers
63 views

Running any query in GraphQL explorer gives error

In Craft 3.5.17.1 when trying to run any query in the GraphQL explorer it returns this error: { "errors": [ { "message": "Trying to get property 'handle' of non-...
1
vote
1answer
32 views

Update a remote stock database

I am building an online store with craft commerce, but I have a problem, I need to update a remote stock on every purchase, this stock is located in a remote server, do you know if exist a plugin ...
0
votes
0answers
9 views

Is it possible to override the product URI for Craft Commerce when using Headless Mode?

I've tried using an alias to override the product URI when using Craft Commerce, but it's not working, it doesn't go to the correct URL associated to the FrontEnd.
0
votes
0answers
11 views

How can I override the language and locale before rendering a template?

I render a template by a controller and it supposed to be rendered by a specific language and locale formatting regardless of current user's language or locale. Is it possible to override the language ...
1
vote
1answer
21 views

Does deleting an original asset but keeping the transform folder asset make Craft replace the original file with the biggest transform?

I have a client who has uploaded many giant images to the CMS (8mb+). I'd like to free up that space now that those image have been transformed to more web-friendly sizes. Is it safe for me to delete ...
1
vote
1answer
20 views

Craft commerce 3 - Module - Lineitem - Get usergroup

I have the following code working. The only thing i have to do is to check which usergroup is the customer in. Is there a simple way to check what usergroup is the customer in? This is my first custom ...
0
votes
0answers
33 views

Why aren't my images displayed on the homepage

Our homepage.twig is a section Our Matrix is called "angebote" (it's german don't ask :D) We created two entries for our matrix This is our Code inside the homepage.twig file for including ...
1
vote
1answer
34 views

How to update stock on a product variant? Setting unknown property error

I am trying to update stock of product variants using a custom plugin on our Craft 3 eCommerce site (its a sync process with an external database). But I can't figure out how to update stock, I get an ...
0
votes
0answers
7 views

S3 Assets - uploading with Asset::SCENARIO_REPLACE - throws error: newLocation

We're programmatically uploading images to an asset volume that's stored in S3; 99% of the time this is fine, but sometimes, for some reason, the asset index is lost and craft thinks it's uploading ...
0
votes
0answers
52 views

Craft 3: Debug Toolbar is 404ing and won't display on multi-site setup

When I am logged in as an admin and I have both of these options enabled on the user preferences: ... the Yii debug toolbar still does not display and there is a 404 error that appears in console, ...
0
votes
0answers
33 views

Can't redirect cpTrigger and api routes/urls - oauth in craftcms

I have OAuth 2.0 installed in my Craft project. I built an event that every URL is redirected to example.com/oauth and needs authorization if not logged in. Everything works except these two routes: /...
0
votes
0answers
14 views

Freeform RedirectURL not working

Good Evening im having issues with the latest version of FreeForm on Craft3. It appears no return URLs are being generated based on the field within the form builder. When looking at the form in ...
0
votes
0answers
24 views

Cannot ZIP craft folder - WINDOWS

I've come across not a deal breaking problem - but an issue that will cost allot of time. When I try to compress the craft folder (so I can upload it to a server) using windows: Send to >> ...
1
vote
2answers
52 views

Craft3 - Getting rid of /web in my URL

I am very new to craft. installed craft3 very long ago, as a beginner, and trying to solve a long-lasted-issue with my url. my goal: Change my base url from www.mywebsite.com/web to www.mywebsite.com ...
0
votes
0answers
32 views

Craft Commerce 3 calling commerce/payments/pay from Axios returns errors

I have headless Craft CMS + Craft Commerce 3 + Mollie for Craft Commerce as backend and decoupled Nuxt.js frontend I'm trying to use POST request to "?action=commerce/payments/pay&note=from+...
1
vote
2answers
35 views

Custom plugin settings add on admin nav bar

I want to control my plugin on the admin navbar but I can't found a way for that.
1
vote
1answer
23 views

When creating new assets what should we put in base Url and document root file?

I am not able to figure out what to put in base url and document root url while making new assets in craft cms
1
vote
1answer
28 views

Is there any way which does not remove Specific Html tags from the redactor editor using striptags only?

Is there any way to do it with striptags only or we have to use another filter?
1
vote
1answer
18 views

How can I get contact form added information on the control panel?

I'm using the contact form plugin to implement the contact form on the front, now I want to see all the contact information on the control panel, So how can I get that in the control panel?
1
vote
1answer
24 views

How to include Inline JavaScript?

Is there any way to add javascript in craft
0
votes
2answers
25 views

Can I store Assets on a Cloud Service like Amazon S3?

Is there any way to store Assets on a Cloud Service?
1
vote
1answer
16 views

How to set Home page menu as active when slug is not defined in admin panel?

Is their is any way to set active class to a page when slug is not define?
0
votes
1answer
24 views

How Can I load Inline CSS in the Redactor Editor?

In Redactor I put some content but I don’t know why Inline CSS is not load? Is there any way to solve this problem?
1
vote
1answer
12 views

Is it possible to image upload on a particular size using a control panel?

I am using the commerce plugin. I want to display an image of the specific size without CSS is there any specific way in the commerce plugin?
1
vote
2answers
44 views

How can I count current indexing inside a loop?

Is it Possible to count current indexing in a loop which starts from indexing 1 as well as 0?
1
vote
1answer
34 views

Is there any way to adjust the width of the custom field in the admin panel?

I want to adjust the width as ( 25%, 50%, 75%, or 100%) of the custom field in the admin panel.
1
vote
1answer
21 views

How to round the decimal value which we store in the admin panel?

Is it possible to round the decimal value we store in the admin panel . Can anyone Explain me with an example
1
vote
1answer
17 views

Want to add a custom field in craft commerce plugin

Is it possible to add a custom field in craft commerce plugin and is it a good idea to add it?
1
vote
1answer
26 views

what is the correct way to programmatically set checkboxes (MultiOptionsFieldData) in a migration? (solved)

I need to update existing entries after the creation of a checkbox fields, to apply the default value to everything that was created before the availability of the new field. The code should run in a ...
1
vote
1answer
28 views

How can I get the cart total item? I tried using a “length” filter but it’s not working with that

I am using the craft commerce plugin and I want to fetch total qty of the cart items. I have tried the length filter but its not working. Is there any other filter that can help in it?
2
votes
1answer
29 views

Can I create multiple website using the same admin control panel and what I have to change for that?

I want to create the multiple website using Craft CMS existing control panel. I am using craft 3.x Do I need the Craft Pro to use this feature?
1
vote
1answer
39 views

Contact Form - Missing submissions

Good Evening and Merry Christmas. We are having an issue with some contact form submissions are not submitting emails and the database entry, however they continue through to the redirect page. The ...
1
vote
0answers
17 views

Update field within Table using column handle in CraftCMS

I am writing a CraftCMS plugin out of which I need to update an existing Entry. Within this entry there is a field of type table which has some columns (with custom handles). No I d like to update one ...
1
vote
1answer
52 views

Understanding migrations and CLI commands

Can someone please help explain some basics regarding migrations and the associated CLI commands to help troubleshoot when things fail? Specifically, How does craft know which migrations have been ...
4
votes
1answer
87 views

Automated deployment with content migrations and structural changes

In the knowledge base article there are 4 steps described to automate the deployment process Pull updates for git Run composer install Run migrate/all Run project-config/apply The problem with this ...
1
vote
0answers
36 views

autoLoginAfterAccountActivation doesn't seem to be working

In the midst of an upgrade from 2 > 3 (Commerce on top of that too). When a user creates an account, it fires an 'Activate your account' email That email goes through to account/activation-success ...
3
votes
1answer
88 views

Using a GraphQL mutation to append a block to a Neo field

I know how to update simple fields on an entry using a mutation: mutation updateRecipe($recipeId: ID, $slug: String) { save_recipes_recipe_Entry(id: $recipeId, slug: $slug) { id title ...
0
votes
0answers
37 views

Need advice for a new project

The customer currently has an app build with Symphony 3.4. The current set-up is too complex to maintain, user unfriendly and not flexible, lags a maintainable SEO structure. The main function of the ...
1
vote
1answer
33 views

no entries or files visible

I got given a db dump using Craft 3.5.16. After installing all the dependencies using composer and npm I can login to the admin section. However, I do not see any entries or any files in the admin ...
1
vote
1answer
133 views

Craft CMS throws Internal Server Error 500

I got given a Craft CMS project build with composer and npm. Pointed valet to the correct folder, installed all the dependencies and started the app with npm run watch. http://localhost:3000 just ...
1
vote
1answer
36 views

Prevent adding users with same email addresses

I am adding new users inside of the Craft controller as part of the frontend user import script. This is the code: $user = new User(); $user->pending = true; $user->username = $email; $user->...
1
vote
1answer
117 views

How do I get the siteName in a module (Craft 3)

In templates I can do something like {{siteName}}. But how do I retrieve this in a module? I've tried: Craft::$app->config->siteName I can grab my custom globals via Craft::$app->globals, but ...

1
2
3 4 5
34