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
60 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
48 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
29 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
19 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
  • 864
2 votes
2 answers
209 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
51 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
33 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
49 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
72 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
  • 1,031
0 votes
1 answer
20 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
1 vote
0 answers
87 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
  • 65
1 vote
1 answer
16 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
42 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
28 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
54 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
  • 65
2 votes
1 answer
24 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
  • 61
2 votes
1 answer
59 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
50 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
  • 65
3 votes
1 answer
184 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
78 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
85 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 vote
1 answer
58 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 ...
user avatar
  • 125
1 vote
2 answers
61 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 ...
user avatar
  • 83
1 vote
1 answer
42 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?
user avatar
0 votes
0 answers
106 views

Vue Apollo with graphQL bearer authorization

I am trying to get queries from my craft 3 graphql, but I don't want to use the public schema meaning I must use an authorization bearer token. I can't quite figure out how to add my token to get my ...
user avatar
  • 11
1 vote
1 answer
46 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 ...
user avatar
0 votes
0 answers
15 views

Filenames with non-ascii characters create a 404 error on server

Filenames with non-ascii characters work perfectly on local server but create a 404 error on production server. If I upload these file on the same server outside of the craft cms enviroment they are ...
user avatar
  • 49
0 votes
0 answers
23 views

Image, files, video tabs are not visible in Redactor Rich Text Field in custom plugin

only the basic formats like italic, bold, redo, undo, strikethrough, html, format are visible and that too only up to 7 formats are visible, if we add more than 7, it will only accept 7 The below is ...
user avatar
1 vote
0 answers
43 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 ...
user avatar
0 votes
0 answers
42 views

SharePoint and Craft CMS Integration

I am looking forward to integrate documents from my Online SharePoint Document library to Craft CMS. Has anyone achieved this feat? If yes, can you help in achieving me to do. Thanks in advance.
user avatar
1 vote
1 answer
65 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:/...
user avatar
  • 51
2 votes
1 answer
38 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 ...
user avatar
3 votes
2 answers
85 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", &...
user avatar
1 vote
2 answers
47 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 ...
user avatar
1 vote
0 answers
40 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 ...
user avatar
  • 11
0 votes
1 answer
203 views

Craft CMS images transform srcset sizes

I'm new to craft cms and I'm trying to generate srcset sizes for an image with the following code. {% set thumb320 = { width: 320, format: 'jpg' } %} {% set thumb320_2x = { width: 640, format: 'jpg' } ...
user avatar
  • 49
0 votes
0 answers
127 views

Duplicate database queries and timeouts

I'm looking to get some advice on excessively duplicated database queries when selecting single types in Craft CMS Our craft instance keeps timing out when trying to load the home page single entry, ...
user avatar
1 vote
1 answer
60 views

How do I get custom fields of User on graphQL?

I am wanting to fetch queries for custom fields of users, how would I go about doing that? So if I did something like this: query { users { id firstName lastName email photo { ...
user avatar
0 votes
0 answers
27 views

Approach for a multi-level navigation with custom child styling. With or without {% nav %}?

I can't figure out the way of thinking in CraftCMS methods when it comes to styling / loading children the correct way, so I hope someone could put me on the right track here. I try to be so detailed ...
user avatar
  • 61
0 votes
0 answers
18 views

Add info windows to embeded Simple Map

How can I add info windows to markers and trigger them on click with a Simple Map? Is there a way to define that in the twig? Map plugin docs: https://docs.ethercreative.co.uk/maps/
user avatar
  • 387
1 vote
1 answer
98 views

chmod(): Operation not permitted using WSL2

Getting this error on a local Craft install with Nitro / Docker. I can get it fixed with: sudo umount /mnt/c sudo mount -t drvfs C: /mnt/c -o metadata This works until then the error appears again ...
user avatar
1 vote
1 answer
31 views

How can I use the final URI segment as an argument without losing the entry variable?

I have a Structure - Products - that contains multiple products, and each product contains different sub pages (details, pricing, etc). One section of the Structure is Details which is under each ...
user avatar
0 votes
0 answers
15 views

Suggestion: Pluralize/Localize/Whateveritize Entry Types

This probably isn't where I'm supposed to post suggestions but I thought this might be a nicety.
user avatar
1 vote
1 answer
159 views

Creating an entry with a matrix field using GraphQL

I am trying to create a new entry in Craft CMS using GraphQL. The entry has a matrix field called "vehicles" that has a single block called "vehicle". This block has a single field ...
user avatar
0 votes
0 answers
16 views

Sudden server error then admin goes to install screen

This is a weird one. I was editing an asset field on a Craft install that's been working fine for weeks. When I went to save the asset I got a little read snackbar message at the top of the Craft page ...
user avatar
4 votes
1 answer
110 views

Is there a way to re-use field groups/layouts?

Coming from Wordpress and using ACF plugin...it's really nice to be able to have say a field group called "SEO Fields" that contains all the custom fields for SEO needs (title, description, ...
user avatar
1 vote
1 answer
84 views

Get the width and height of videos

I need to get the width and height of videos to calculate some aspect ratio. Craft doesn't do this out of the box. Any plugins that does this? Or can i write my own?
user avatar
1 vote
2 answers
64 views

Globals disappeared/Queue Failed — Propagating global sets

In desperate need of some help! I noticed on one of my multi-sites, 5 out of 8 sites have items missing in the Globals sidebar.. When I manually type in the URL to view one of the global items I get: ...
user avatar
  • 109

1
2
3 4 5
37