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
29 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. {% ...
user avatar
1 vote
1 answer
164 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. ...
user avatar
1 vote
1 answer
27 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 ...
user avatar
  • 51
0 votes
0 answers
62 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 ...
user avatar
  • 319
0 votes
0 answers
51 views

Craft CMS - General Error: 1364 Field 'id' dosen't have a default value

I'm migrating my craft cms site from shared hosting to vps. I did install all the basic services required by Craft under vps. -> Install LAMP Stack. -> cloned code base from git -> SSL Cert -&...
user avatar
1 vote
1 answer
30 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 ...
user avatar
1 vote
1 answer
46 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 ...
user avatar
  • 21
1 vote
1 answer
36 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 ...
user avatar
1 vote
1 answer
38 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 ...
user avatar
  • 113
0 votes
0 answers
23 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 ...
user avatar
  • 1,230
2 votes
1 answer
71 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.
user avatar
1 vote
1 answer
63 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, <...
user avatar
0 votes
0 answers
21 views

How to check if the user is trying to sign in from a new device?

I have a multi-step signup form. Registration workflow: 1- Verify phone number by Twilio SMS service. 2- if the number is activated successfully then show the signup form and register a new account. ...
user avatar
  • 125
1 vote
1 answer
116 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 ...
user avatar
  • 61
1 vote
1 answer
76 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&...
user avatar
1 vote
1 answer
28 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 ...
user avatar
  • 11
0 votes
0 answers
34 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 ...
user avatar
  • 1
0 votes
0 answers
27 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 ...
user avatar
0 votes
1 answer
76 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
user avatar
  • 23
1 vote
1 answer
29 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 ...
user avatar
1 vote
1 answer
266 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 :...
user avatar
  • 61
0 votes
0 answers
150 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 ...
user avatar
  • 2,717
3 votes
1 answer
95 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!) ...
user avatar
  • 61
1 vote
1 answer
53 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/...
user avatar
  • 11
4 votes
1 answer
31 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 ...
user avatar
  • 438
0 votes
0 answers
57 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 ...
user avatar
3 votes
2 answers
66 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 ...
user avatar
  • 369
0 votes
1 answer
113 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
user avatar
  • 23
1 vote
1 answer
51 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 ...
user avatar
  • 369
1 vote
1 answer
27 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 ...
user avatar
  • 289
0 votes
0 answers
39 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 ...
user avatar
2 votes
1 answer
74 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 ...
user avatar
  • 1,834
1 vote
1 answer
91 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 ...
user avatar
  • 27
1 vote
1 answer
41 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?
user avatar
1 vote
0 answers
29 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 ...
user avatar
  • 11
1 vote
1 answer
99 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 ...
user avatar
  • 125
1 vote
1 answer
109 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 /...
user avatar
1 vote
1 answer
50 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?
user avatar
1 vote
1 answer
24 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 ...
user avatar
1 vote
1 answer
42 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 ...
user avatar
1 vote
1 answer
93 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 ...
user avatar
  • 11
0 votes
0 answers
40 views

Custom Plugin JS load order/breaking in Control Panel

We have site that has a small custom plugin. One of the things this custom plugin does is run a small bit of JS that allows the 'Importable' plugin to work on table fields within a matrix. The JS that ...
user avatar
0 votes
0 answers
43 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 ...
user avatar
2 votes
1 answer
76 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 ...
user avatar
  • 1,130
2 votes
2 answers
147 views

How to get multiple image array using API or PHP query

This is a single asset field to upload multiple images so how to get all images using the query. I have three images here but I am getting one image using this code $home = \craft\elements\Entry::...
user avatar
1 vote
1 answer
95 views

DOM hash url in entry slug

I try to set the slug of an entry to a url using a hash. https://url.spec.whatwg.org/#dom-url-hash However it seems not possible by default, craftcms changes the hash to a dash. I need that as ...
user avatar
2 votes
1 answer
54 views

Free Shipping toggle switch in product editor doesn't work

Hi in the product editor of Craft Commerce by default there is a toggle switch for Free Shipping on the right side column. I have the base rate set up as a standard flat rate charge but wanted to know ...
user avatar
  • 299
0 votes
0 answers
17 views

sourceSnapshot not populated in lineItem adjustment

I'm querying the order, and from the order I'm looping through the line items returned from getLineItems(). When I then dump the line item, calling getAdjustments(), the sourceSnapshot never seems to ...
user avatar
1 vote
1 answer
25 views

Craft Commerce Checkout: How to prevent payment link from bypassing shipping section in nav-checkout

I'm using checkout.twig in the CraftCMS shop checkout examples templates. As the user proceeds though the checkout process, this nav strip appears at the top of each page and marks their progress. The ...
user avatar
  • 299
2 votes
2 answers
61 views

How to reliably determine if an entry is being duplicated?

On a Craft 3.7 site, I need to make some changes when duplicating an element: set the dateCreated, dateUpdate & postDate to the current date ensure the entry is disabled clear the value of an ...
user avatar
  • 1,130

1 2
3
4 5
37