Skip to main content

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
1 vote
1 answer
273 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 ...
James White's user avatar
  • 1,171
2 votes
1 answer
188 views

500 Internal error on 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 ...
Rodney Little's user avatar
1 vote
1 answer
199 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 ...
Mike Niland's user avatar
2 votes
2 answers
777 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 ...
Thijs Kaspers's user avatar
2 votes
1 answer
115 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 ...
Maarten Heideman's user avatar
0 votes
1 answer
272 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: "&...
Kishore Natarajan's user avatar
0 votes
0 answers
31 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 {...
Christopher DuCharme's user avatar
1 vote
1 answer
33 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, ...
Srecko Micic's user avatar
1 vote
1 answer
434 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 = '...
Prashant sharma's user avatar
1 vote
1 answer
26 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 ...
Vinod Patidar's user avatar
1 vote
1 answer
268 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. ...
nikolaj frey's user avatar
1 vote
2 answers
464 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 ...
plaintxt's user avatar
  • 488
1 vote
1 answer
240 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 ...
James White's user avatar
  • 1,171
1 vote
1 answer
23 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. ...
Jaytrix's user avatar
  • 337
1 vote
1 answer
1k 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 ...
H_alt's user avatar
  • 13
1 vote
1 answer
421 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 ...
Market South's user avatar
1 vote
1 answer
133 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. ...
loliki's user avatar
  • 151
1 vote
0 answers
37 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 ...
Parthiban's user avatar
0 votes
0 answers
41 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
KAL Group's user avatar
0 votes
0 answers
201 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 ...
Martin's user avatar
  • 53
1 vote
1 answer
137 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....
g1un's user avatar
  • 81
1 vote
2 answers
611 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: [&...
Raul's user avatar
  • 11
0 votes
0 answers
73 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 ...
webskimajster's user avatar
1 vote
1 answer
42 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'...
Ian Ebden's user avatar
  • 894
4 votes
3 answers
1k 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 ...
qbit76's user avatar
  • 43
1 vote
1 answer
459 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 ...
Nick's user avatar
  • 11
0 votes
1 answer
100 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 ...
Coder949's user avatar
  • 135
1 vote
1 answer
109 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 ...
Mike Niland's user avatar
2 votes
1 answer
151 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 ...
James White's user avatar
  • 1,171
1 vote
1 answer
111 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 ...
Mathies Gielen's user avatar
1 vote
0 answers
318 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 ...
Yawner's user avatar
  • 65
1 vote
1 answer
29 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 ...
Joshua's user avatar
  • 11
2 votes
1 answer
132 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 ...
sea_monster's user avatar
3 votes
1 answer
143 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 ...
Yawner's user avatar
  • 65
2 votes
1 answer
77 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 ...
JohnC's user avatar
  • 61
3 votes
1 answer
405 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 ...
Aram Loosman's user avatar
2 votes
1 answer
173 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 ...
Yawner's user avatar
  • 65
3 votes
1 answer
724 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 ...
vlasits's user avatar
  • 203
2 votes
1 answer
181 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. ...
vanburen's user avatar
2 votes
1 answer
417 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 ...
Micah Henning's user avatar
1 vote
1 answer
335 views

Check user data before login - Events on Craft3?

I need some help with my login process, it's working but I feel it's not the best approach to achieve it I have the following workflow for the Login process : 1- enter username/password -> press ...
Ra3d K's user avatar
  • 125
2 votes
2 answers
322 views

Base URL in CP keeps defaulting to @web/

In the CP > Settings > Sites, setting the Base URL keeps defaulting to @web/ I have an environment variable $DEFAULT_SITE_URL set up in my [.env] file, and this is recognized (auto-fill suggests ...
Jolle's user avatar
  • 95
1 vote
1 answer
141 views

How to increase control panel pagination item count?

Our client whats to show 200 records in the control-panel entries list per page. Is it possible to change via any config settings?
Parthiban's user avatar
1 vote
1 answer
123 views

Custom Field Types File upload returns null

I am working on a plugin which adds a custom field type. The field type should allow the upload of a file, which is then sent to another server (thus not a normal asset, as it is only temporarily ...
Aram Loosman's user avatar
1 vote
1 answer
221 views

CraftCMS Image Transform returning NULL on asset.url when stored on AWS S3 Bucket

So i'm using Craft as a headless CMS with a React frontend. When querying assets on a S3 bucket and applying a transform to them in my GraphQL query the URL response is NULL. This isn't the case when ...
samroberts707's user avatar
1 vote
1 answer
286 views

Template not found: admin

I've just tried setting up a project locally which we have deployed on a Laravel Forge server. After I ran composer install, craft setup, and then craft project-config/apply And try visiting my https:/...
lopu's user avatar
  • 51
2 votes
1 answer
61 views

Fast way to delete relations without messing up foreign keys

I have a large import with over 5000 products. These product elements have a image field wich is a assets relation field. Looping over the products and setting the field as null and then save takes ...
bartpulse's user avatar
3 votes
2 answers
197 views

How do you deal with random class and cache?

I recently started using tailwindcss and I generate random classes via the function random() and get "text-nature", "bg-nature", bg-nature-light", "text-culture", &...
Elodie Grondin's user avatar
1 vote
2 answers
202 views

Feed-me import nested categories from CSV/Google sheets

I'm currently able to import nested categories from a Google Sheets when they already exist. But when a child category does not exist, the category is created at the first level. It's quite logic ...
Elodie Grondin's user avatar
1 vote
0 answers
58 views

Internal server error - Cannot serve directory

Randomly a couple of times a day my website throws an Internal Server Error that fixes itself within minutes. Checking the logs (have replaced my username with 'username') it looks like a server issue ...
otb's user avatar
  • 11

1 2 3
4
5
39