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
0 votes
0 answers
9 views

Get previous site siteGroup

Is there a way to get the siteGroup of the previous url? I have a multiSite/multilanguage project. I want to be able to check the previous Url siteGroup and compare it with the current siteGroup
user avatar
0 votes
0 answers
5 views

Editing entry without creating a new revision in particular scenario. is this possible?

I'm updating particular field in "A" section whenever a new entry is created in "B" section. In this scenario I don't want revision to be created for "A" section. Is this ...
user avatar
0 votes
1 answer
16 views

Problem running a sale on the site

Craft shows the sale running, and can tell which products are on sale using a: {% set saleProducts = craft.products() .hasVariant({ hasSales: true, hasStock: true }).all() %} loop, but on ...
user avatar
  • 1
0 votes
1 answer
18 views

Is re-running the ConvertEntryRevisions queue job safe to run after migration to Craft CMS 3.7?

I have a fairly large Craft CMS 2 site was recently migrated to Craft CMS 3, because of the large amount of entry revisions, the migration that runs the ConvertEntryRevisions queue job did not ...
user avatar
0 votes
1 answer
24 views

Best way to find current/pending jobs without knowing their ID in the queue

In Craft 2, you used to be able to do something like this to find pending tasks: craft()->tasks->getPendingTasks('MyPlugin_CustomTask') In Craft 3 we of course now have the Queue, however there ...
user avatar
0 votes
1 answer
17 views

500 Internal erroron admin - session related

I am working on trying to get a local copy of a site working, but ran into an issue where the front end is working, but the admin page is not responding when I try to login. This site is Craft 3.7.44 ...
user avatar
0 votes
0 answers
27 views

Lozad doesn't swap images on staging site

I inherited some lozad.js lazy loading code that broke when I pushed to the staging server. Code swaps out the thumbnail image for the high quality version. The ones in the view on load aren't getting ...
user avatar
  • 55
0 votes
1 answer
23 views

Plugin install/remove causes fatal error on local

After updating to Craft Pro 3.7.44 my local MAMP site now throws a server error when adding/removing a plugin within the Craft CMS UI. Editing the composer.json file manually and running composer ...
user avatar
2 votes
2 answers
55 views

Recommended caches to clear after server deployments?

Craft has this article about deployment best practices: https://craftcms.com/knowledge-base/deployment-best-practices It also states that you might want to clear caches after deployments, which is of ...
user avatar
2 votes
1 answer
48 views

How I'll get the orderId in EVENT_AFTER_COMPLETE_ORDER in craft commerce?

I'll want to update an orderStatus in craft commerce after the order is complete for a specific (digital) pruduct type. To send an extra email with download links, confirm email is already send based ...
user avatar
0 votes
1 answer
21 views

trying to insert super table field values using graphql in craft cms

cant able to store values from super table field,need a correct format to do Graphql mutation saveEntry($superTable: [demoSuperTable_SuperTableBlockContainerInput] = {demoSuperTable_0: {id: "&...
user avatar
0 votes
0 answers
16 views

Craft cms with graphql How to make reverse query(In terms of relation)

entries(limit: 50, section: "branches", orderBy: "dateUpdated") { id branchTitle: title ... on branches_standard_Entry { branchAddress: map bank: ...
user avatar
0 votes
0 answers
24 views

Prevent {% requireLogin %} from effecting plugins

We user several plugins that export the current entry via buttons in the Admin CP. One plugin exports the entry as a PDF and another downloads it as HTML along with its assets in a zip. I need to add {...
user avatar
1 vote
1 answer
22 views

Installation issues of Nitro Craft on Linux

I am having hard time installing Nitro Craft, I am probably have to do it manually. Spent entire day and not getting much of progress. Anyways, I suspect that main issue I have is that I am on Linux, ...
user avatar
1 vote
1 answer
32 views

Sprig resets value on render

I Have a sprig component that has two variables, but the moment Sprig changes one of them, the other value resets. Please Help products.twig {% extends "_layout/base" %} {% set wrapClass = '...
user avatar
1 vote
1 answer
14 views

Pedigree In channel type entry

I want to create a pedigree for user. I have created a section (channel type) and added some properties like about, name and some other user properties. I also want to add a pedigree for that user but ...
user avatar
1 vote
1 answer
12 views

How do you upload an asset via an API or GraphQL

Is it possible to upload a new asset via some POST request to craft's API? Or maybe through a graphql mutation? I noticed in the public schema there is the option for Creating assets within a volume. ...
user avatar
1 vote
1 answer
24 views

MySQL server has gone away / max_allowed_packet

After adding a second block type to an existing matrix field, we started receiving a "General error: 2006 MySQL server has gone away" error when additional content was saved to the new block ...
user avatar
  • 448
1 vote
1 answer
46 views

Craft warning: Attempting to set settings on a plugin that doesn't have settings: [handle]

I've noticed that this warning is being output in logs constantly Attempting to set settings on a plugin that doesn't have settings: tablemaker The tablemaker plugin does not define a settings model ...
user avatar
1 vote
1 answer
18 views

Entry query on field using the `and` parameter

I'm struggling to get a and entry query to work - it seems to be stuck on or. Query is {% set blogQ = blogQ.blogTags(['and', blogTag|join(",")]) %} where blogTag is [2291,2290] in this case. ...
user avatar
  • 107
1 vote
1 answer
78 views

Getting error in craft cms after composer update

I am getting the error below after I migrated from another server I copied all the files and DB and did composer install on the root directory folder it asked to question 1.yiisoft/yii2-composer ...
user avatar
  • 13
1 vote
1 answer
36 views

Getting column not found when using 'Entry::find()' to find the matching channel entry in custom plugin

We are building a plugin to perform some custom operations with an ERP system. We created a section for managing the users from ERP. We are able to create new users as channel entries and update them ...
user avatar
1 vote
1 answer
24 views

Increment automatically the number field

I'm building a component in which the value of a number should be increased every 2 hours by 0.1. What would be the best solution for that? I have a field type number with the value 1200 by default. ...
user avatar
  • 149
1 vote
0 answers
31 views

Dropdown field value printing cause additional DB queries in craft CMS 3.7

I am fetching an entry with drop-down values and When I print the entry the values are in the entry object. When I try to print the value like entry.dropdown.value it causes additional DB queries to ...
user avatar
0 votes
0 answers
14 views

Expiry Date not being saved

we are trying to take advantage of the expiry date of Entries in Craft, but have observed that this field is not being saved into the database. Any ideas why this isn't being saved? Craft CMS 3.7.39
user avatar
0 votes
0 answers
39 views

Why is my database stuck at the 'Creating sort index' query?

So I imported the production database locally and it is getting stuck at the 'creating sort index' stage of the query when I try to log in to the CMS. This is the Server Process table from SequelAce ...
user avatar
  • 1
0 votes
0 answers
15 views

Craft CMS - Free Form builder plugin create form issue

I trying to create form with Free Form builder https://plugins.craftcms.com/freeform and when I submit it just disappear, nothing happens ( licence is activated ). Any idea?
user avatar
1 vote
1 answer
50 views

Craft CMS admin pages return ERR_EMPTY_RESPONSE locally

Craft CMS admin pages don't load. Sometimes some pages like starting admin page or settings load, or load after refresh. Chrome browser shows ERR_EMPTY_RESPONSE error. Here is video. PHP version 7....
user avatar
  • 81
1 vote
2 answers
35 views

How to get user info in a custom plugin task?

I've been trying to get the user id when running a task to save it on a table but cannot find a way to get it not even the user info. Using Craft::$app->getUser() or Craft::$app->user I get: [&...
user avatar
  • 11
0 votes
0 answers
28 views

Problem with "save and continue editing"

i have some weird behaviour in my craft installation. It came after some update not sure when. The problem is when i use "save and continue editing" button (or shortcode) then i'm redirected ...
user avatar
1 vote
1 answer
17 views

Outputting Opening Hours in SEOmatic

I could use some help outputting opening hours from SEOmatic's Site Settings/Identity. The docs aren't clear on this, and the example at https://github.com/nystudio107/craft-seomatic/issues/843 doesn'...
user avatar
  • 854
2 votes
1 answer
136 views

Ensure @web alias is explicitly overridden

I just stumbled upon this advice in my Craft3-system report: "Ensure @web alias is explicitly overridden" In which file do I need to put the override? "config/general.php" doesn't ...
user avatar
  • 23
1 vote
1 answer
35 views

How To Install Craft Locally Using XAMPP Without Reading From Web Directory

I'm just starting off working with craft and haven't had much of an issue installing the set and getting things configured locally. I'm using XAMPP but noticed once the installation completes the URL ...
user avatar
  • 11
0 votes
1 answer
28 views

How can I disable backups for the Feed Me plugin in CraftCMS?

How can I disable backups for the Feed Me plugin in CraftCMS? I already disabled general backups in general.php of Craft but now Feed Me is not happy with that saying that: Database not backed up ...
user avatar
  • 125
1 vote
1 answer
48 views

Front-End user registration dynamic usernames - duplicate check

I have a front-end user registration form that generates a username automatically based on the first and last name inputs. This works as intended but on the off chance that two people have the same ...
user avatar
2 votes
1 answer
68 views

::model(), ::populateModel() and ::populateModels() in Craft 3

I'm attempting to port a custom plugin that was originally written for Craft 2. It has a fair bit of logic, controllers, services, records, models etc. The records and models which I admittedly don't ...
user avatar
0 votes
0 answers
17 views

Can't access Cookie from controller in plugin

In the frontend my website sets a cookie wich i need during a controller action. When calling the controller action from my plugin this Cookie gets duplicated and the value is replaced with an ...
user avatar
0 votes
0 answers
69 views

Craft Commerce 3 guest checkout flow – can't update addresses

I'm finding a guest checkout flow in Commerce 3.4.14 insanely confusing, docs aren't much help. I'm using Craft Solo and Commerce Lite. TL;DR I realize the code below is probably too complex, so even ...
user avatar
  • 55
1 vote
1 answer
15 views

User profile - if user logs out after saving an Asset - Invalid subpath “profile/{{currentUser.id}}” - SSO Login fails

Having tested this error only occurs while using the SAML Service provider plugin: I have tested in multiple versioning env and experienced the same issue. I can save an asset file Image or doc while ...
user avatar
  • 11
0 votes
0 answers
20 views

Craft Console Command not getting current entry revision

I need help with Craft CMS: We just migrated a Craft CMS website to another server (AWS). It seems that everything works fine on the Craft CMS website and the back office except one thing that is not ...
user avatar
0 votes
0 answers
18 views

How to dump the db for running testing function

I want to set up the db for running testing function. I don't want to dump the whole db but just with the required table structure and records. Probably need to do it again if any new field has beed ...
user avatar
  • 27
0 votes
0 answers
23 views

Local GraphQL requests failing due to SSL issues (unable to get local issuer certificate)

I have a local install of Craft 3 set up as a headless CMS and served via Nitro. I’m pulling in data to Next.js via Apollo GraphQL. I’m able to successfully query Craft for a list of entries from the ...
user avatar
2 votes
1 answer
22 views

GraphQL IDE doesn't show up in Craft Admin

In config/general.php, I've enabled GraphQL and headless mode like so: "enableGql" => true, "headlessMode" => true, The official docs suggest that there's a built-in IDE for ...
user avatar
3 votes
1 answer
45 views

.all() — Looping through element queries directly has been deprecated

This is very nearly a duplicate question but I can't figure out where to insert .all() to execute my element query. I'm still asking because I may be messing up php, function or filter syntax ...
user avatar
  • 55
2 votes
1 answer
19 views

Craft multi-site enable password protection

I have a multi-site Craft CMS set up with 6 sites. I am planning to live only 5 sites and I need to keep the 1 site in development phase. Also I want to enable fron-end password protection for the dev ...
user avatar
  • 51
2 votes
1 answer
46 views

How to get column name of an entrie's field

I want to query some entries in a section. I am able to write a query using a GET Param as a filter on the title field. If I want to query a custom field however I need to know the precise column ...
user avatar
2 votes
1 answer
40 views

Craft Commerce: Multiple redirect submit buttons from cart form (checkout/update cart) without ajax

I'm building a basic cart page in Craft 3.7.37 with Commerce 3.4.12. The /store/cart page has a <form> with the line items in the cart next to an <input /> to change quantity and one to ...
user avatar
  • 55
3 votes
1 answer
137 views

"Template not found" error when attempting to access static web page

I'm pretty new to craft and I inherited a site that hosts a map from MapBox as a static html file in the /web folder, so something like /web/map/old-map/index.html. Hitting mysite.org/map/old-map ...
user avatar
  • 193
2 votes
1 answer
73 views

Trigger Webhook when Updates are Available

Is it possible with the Webhooks plugin to trigger a POST request anytime Craft has updates available? I thought the Updates Class would be the place to start but that does not appear to be correct. ...
user avatar
2 votes
1 answer
73 views

Security Key Not Loading from Environment: Next Twig\Error\RuntimeError: craft\web\Request::cookieValidationKey must be configured with a secret key

Our new Craft CMS instance in the AWS cloud won't load the security key from an environment variable. (We do not use a .env file.) $ curl http://localhost/actions/app/health-check An internal server ...
user avatar

1
2 3 4 5
37