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
0 votes
1 answer
1k 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' } ...
Samuel's user avatar
  • 69
0 votes
0 answers
319 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, ...
Kyle Lambert's user avatar
1 vote
1 answer
291 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 { ...
Keatyn Garton's user avatar
1 vote
1 answer
928 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 ...
Álvaro Franz's user avatar
1 vote
1 answer
91 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 ...
kevindeleon's user avatar
1 vote
1 answer
720 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 ...
theboldben's user avatar
5 votes
1 answer
318 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, ...
kevindeleon's user avatar
1 vote
1 answer
771 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?
J. Sveum's user avatar
1 vote
2 answers
243 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: ...
fbnntt's user avatar
  • 109
2 votes
1 answer
763 views

Exclude 2 entries from a query

I know this question has been asked before but I'm still not able to solve the issue in this particular situation. I want to remove one fixed(#95) entry id and the current entry.id from the query. {% ...
Robbie Post's user avatar
1 vote
1 answer
1k views

How to create custom utility/helper functions for use in Twig templates?

So when using Drupal or Wordpress -- obviously you can write as much PHP in a template as you need, or in Wordpress for example, you can abstract that functionality away to the functions.php file. ...
kevindeleon's user avatar
1 vote
1 answer
89 views

Is there a way to keep fields synced between 2 craft instances

Has been a pleasure using Craft 3 for a while to build headless JAMstack websites. The issue we have run into is keeping our staging and production environments as separate as possible. We would ...
lopu's user avatar
  • 51
1 vote
0 answers
174 views

How to keep logged in User on 1 Craft Multi Site, but with different domains

I have one multisite craft installation, where the different languages for the sites use different domains: en -> domain.com de -> otherdomain.com .. Users can log in via frontend. Now if users ...
Henrik's user avatar
  • 425
1 vote
1 answer
44 views

Display time along with date in admin listing page

We need to display time along with the date in the admin listing pages. I do know that the tooltip will show the time. But the client needs the time to be displayed on the listing itself. Is there an ...
Parthiban's user avatar
1 vote
1 answer
93 views

Sharing data between Multiple Craft 3 CMS instances

I am not asking about multi-site. Rather, I am curious if there is existing support for "sharing" data across unique Craft 3 installs. For instance, let's say he have 2 Craft 3 installs ...
blnkt's user avatar
  • 21
1 vote
1 answer
83 views

The craft way of creating fields through code?

so I am new to Craft CMS, and would like to understand the Craft developer workflow. Currently I have been developing on EpiServer using C# in Visual Studio. We have a dev, staging and production ...
BrokenCode's user avatar
1 vote
1 answer
77 views

Sprout Forms + Sprout e-mail - Contact form confirmation e-mail

We are using for our first CraftCMS website: Sprout forms Sprout e-mail In our "sprout-forms/entries" all entries show up. So all fields got saved perfect. Now we would like to send to an ...
Duikboot's user avatar
  • 113
0 votes
0 answers
27 views

Modifying webroot in Nitro

I've just changed the webroot for one of my Craft Nitro sites. After running nitro apply and it completing. I'm getting 404 - Not Found Nginx Am I doing something wrong here? Is there a command I'm ...
JMKelley's user avatar
  • 1,416
2 votes
1 answer
263 views

Is it possible to increase the number of entries in the entry list in the entry view, where default is 100 per page?

Is it possible to increase the number of entries in the entry list in the entry view, where default is 100 per page? We want to show 300 entries per page in the admiun panel.
Malik Rehan's user avatar
1 vote
1 answer
234 views

Craft CMS SSL added to website correctly but says insecure for admin panel

I have 2 websites one in craft cms 2 and the other in craft cms 3. Everything works fine except the control panel always shows HTTPS insecure, for both the sites. Below is my .htacces file, <...
harshal jadhav's user avatar
1 vote
1 answer
299 views

Is there a way to install a demo without Docker / Nitro?

As I'm a total n00b, I was wondering if there's a way to install, or import data from (for example) Spoke and Chain without using Docker, or Nitro? For what I've seen, CraftCMS will be something to ...
Hielke's user avatar
  • 81
1 vote
1 answer
242 views

How to find next sibling from entry order of parent entries field

I have an index of projects that uses a standard entries field to select multiple entries to display and also provides a custom order (different to their Structure order). This is my "Projects&...
Benek Lisefski's user avatar
1 vote
1 answer
93 views

Approach for creating a dropdown for an entry's field based on a selected entry

I'm running in to a situation that I don't know how to solve in Craft. I want admin CP users to select one entry from a list, and then based on that specific entry select a value from inside the ...
Sietse's user avatar
  • 11
0 votes
0 answers
121 views

Prevent breaks in redactor

I'm trying to configure redactor in Craft 3 to only allow a single line. Setting "enterKey" to false seems great for typing, but pasting content still makes it add breaks. Here's my ...
Mik's user avatar
  • 1
0 votes
0 answers
48 views

Character encoding problem when move between PCs

I'm using MAMP PRO to develop site in local environment with Cloud functions for sync. Everything works fine except for character coding of entries' text. Evidently a problem with encoding but I can't ...
Edoardo Stefani's user avatar
0 votes
1 answer
148 views

How to override homepage content through plugin?

Want to override index.twig content through a custom plugin. I want to create a plugin that appends some content on website homepage. How to Achieve this any reference will be helpful
DTS's user avatar
  • 23
1 vote
1 answer
31 views

Updates Disappeared Overnight - What Could Be Cause?

I made some updates to various aspects of a Craft CMS site early in December. These updates were in place for over a week, and then overnight disappeared. One example is I made an update to the site's ...
badghost's user avatar
1 vote
1 answer
3k views

Tailwind CSS: require(...) is not a function error in VSCode

Maybe it's something stupid I'm overlooking, but nevertheless I tried everything to overcome this error. I followed the tutorial step by step, so maybe I'm looking totally in the wrong direction here :...
Hielke's user avatar
  • 81
0 votes
1 answer
511 views

How do you create a GraphQL mutation to upload a file for an entry's asset field?

In my mutation I need to upload a file to an Asset Field. Can this all be done in one mutation or do you need to upload the file in one mutation and assign the id to the asset field in a secondary ...
a-am's user avatar
  • 2,857
3 votes
1 answer
540 views

Is there a way to return all available (custom) variables in some kind of list?

As I'm still a total n00b in working with CraftCMS, so I hope to get some help from more experienced users :-) I followed every available tutorial (which are very clear and well written. Great job!) ...
Hielke's user avatar
  • 81
1 vote
1 answer
212 views

Deploy Craft CMS site to VPS for the first time

I'm completely new to deploying a Craft CMS to a web server and don't know where to start. I have self taught experience in front-end development but I'm lost when it comes to anything deployment/...
Sam's user avatar
  • 11
5 votes
1 answer
86 views

Identify event origin (e.g. via admin vs module code)?

When using Craft Event triggers in PHP (e.g. Event::on), is there any event metadata that can tell where the event originated from? E.g. if it was triggered from an admin action, or if it was ...
iamkeir's user avatar
  • 468
0 votes
0 answers
214 views

Composer needs GitHub token to update craft cms

I was on craft v3.7.24, but I needed bugfixes in 3.7.25.1. Both Craft update console command and composer told me they couldn't authenticate against GitHub and/or needed an API token. composer update ...
S. Parton's user avatar
4 votes
2 answers
494 views

How to set SMTP Enrcyption with an environment variable

The official Craft documentation says it is possible to set the "Encryption Method (SMTP)" , Snipped from the documentation, with an Environment Variable. I think i am missing something but ...
Leonardo's user avatar
  • 471
0 votes
1 answer
282 views

Want to use assets field my template settings in custom plugin craftcms

I am creating a plugin that is based on images the admin will upload some sort of images in plugin settings not sure how to creat image field setting in plugin
DTS's user avatar
  • 23
1 vote
1 answer
80 views

Remove dynamicly transformed images

Is it possible to remove/delete all, via transformer, generated images? Leaving the original be. Craft creates new directories to handle these images. So i could create a script in combination with a ...
Leonardo's user avatar
  • 471
1 vote
1 answer
52 views

Set a default Channel page if no slug is provided in the URL

I was wondering if there was a way to set a channels page as the default page to load if there is no slug address i.e. I want the below web address to default to a skills page myWebsite.com/skills ...
Wally's user avatar
  • 343
0 votes
0 answers
77 views

Entries Field save errors

I'm running into some odd behavior with an entries field. There are multiple entries fields on the site and all work as expected but one. The behavior is as follows. If there are multiple entries ...
Josh Parylak's user avatar
2 votes
1 answer
96 views

Redesign of existing commerce site with content/structure changes - whats the best way to manage this?

So I am currently working on an existing clients craft and craft commerce website and looking to completely redesign and revamp this. Earlier in the yer, this underwent a major upgrade in terms of the ...
Terry Upton's user avatar
  • 1,894
1 vote
1 answer
244 views

How to generate feed for Feed Me plugin

I have a site in staging and production env, they have the same data structure. I want to sync an entry from staging to production. Is it something that Feed Me plugin can do? and how to generate the ...
Thomas's user avatar
  • 69
1 vote
1 answer
197 views

Is there a way to display only the selected widgets to the user group or disable them altogether?

I would like to display only the selected widgets to the particular user group. Also is there a way to disable default widgets like craft news, Recent entries etc?
Parthiban's user avatar
2 votes
0 answers
59 views

GraphQL next does not accept 'relatedToCategories'

I'm trying to get the next project in the "projects" section but with the same category. So because I can't do it in one query (the value of my category is in the result), I do another query ...
GaelP's user avatar
  • 21
1 vote
1 answer
409 views

How does Craft CMS gets data from a 3rd part API?

I have an event page for viewing movies showtime and i want to connect to a 3rd party api to get the movie's info ( show time, cinema name,...etc ) how to do it? can i do this without having to create ...
Ra3d K's user avatar
  • 125
1 vote
1 answer
411 views

Craft CMS admin intermittent internal server errors

I'm getting intermittent Internal server errors in Craft admin. This has happened out of the blue on an active site. Craft pro 3.041 phperrors.log: PHP Notice: Undefined index: constraint_name in /...
Graham Bennett's user avatar
1 vote
1 answer
217 views

How to make "Wheel Form" fields in JSON format using API

I've installed a "wheel form" plugin on headless CMS. Now how do I make this form JSON format using API or write PHP code for display on the frontend?
Santanu Adak's user avatar
1 vote
1 answer
80 views

How do I add an import page to Craft CMS

I need an to add an import page to a craft CMS. But although I have experience as a full stack programmer I don't see how to add a page to the menu of the CMS. How is this done? Can anyone tell me? I ...
Olivier de Jonge's user avatar
1 vote
1 answer
53 views

How to Add “Enabled Globally” in each entry page?

I want to Add "Enabled Globally" in each entry page So when users create a new page, it will set English as the default content (apply to other languages), then the user can edit on specific ...
Santanu Adak's user avatar
1 vote
1 answer
591 views

Check for existing jobs in queue

Is it possible in code to search for a job/list out all jobs? I have built a plugin that scans an external API and I want to scan on an interval as well as allow the user to fire off a manual scan. I ...
Henry's user avatar
  • 11
0 votes
0 answers
105 views

Contact Form not sending email with most recent version of template

Platform: Craft Solo 3.7.21 P&T Contact Form plug in 2.2.7 Redactor 2.8.8 I am trying to use the Contact Form plugin and having problems when using the latest version of the API. I have an old ...
g. eagle's user avatar
2 votes
1 answer
182 views

How to make custom element types restorable?

In Craft CMS 3, custom element types support soft-deletion out of the box. But once soft-deleted, there is now way to restore elements that are now listed in the Trashed status, the only available ...
nstCactus's user avatar
  • 1,149

1
3 4
5
6 7
39