All Questions
14,269
questions
0
votes
0
answers
26
views
Multisite/Multidomain and headless mode
Our company has two websites. Both sites were build independently with Craft CMS. One site uses Twig templates, the other operates in headless mode. Is it possible to „mix“ them in one Craft system, ...
0
votes
0
answers
23
views
Does descendantOf only accept a single value?
I have a products page on which I'm filtering with Sprig.
There are some categories in the form of checkboxes.
These categories have some subcategories.
The categories are a structured section with ...
0
votes
0
answers
38
views
Addresses lost in the void after Craft and Commerce upgrade from 3 to 4
With the changes to addresses in Craft 4 I'm trying to do a cleanup of 80 000 addresses I have, many who does not have a valid user or commerce orders connceted to them.
Trying to fetch all addresses ...
1
vote
1
answer
33
views
Big upgrade completed locally, how to upgrade live?
I have a site that was Craft 3.4 and Commerce 3.x (unsure of exact version).
Locally, I've been spent a big chunk of today updating to the latest versions of everything and making sure all still works ...
0
votes
0
answers
27
views
Admin 403 error: cpTrigger no longer working properly
Typing "/admin" on local or remote server yields a server generated 403 forbidden error. Fortunately I can still login to the Craft 4 admin if I type "/admin/login".
What I've ...
0
votes
0
answers
23
views
Feed Me feeds not running
We have 3 instances of Feed Me installed:
Prod: PHP 7.4.33; Craft CMS 3.7.63; Feed Me 4.5.3
Staging: PHP 8.1.17; Craft CMS 3.9.1; Feed Me 4.7
Dev: PHP 7.4.33; Craft CMS 3.9.1; Feed Me 4.7
Prod ...
1
vote
1
answer
58
views
Help! Update caused Craft to break
I haven't got around to do much with Craft yet, but I think I've installed it correctly - everything seemed to be working fine, but when I clicked the "update" button today, it broke. I now ...
1
vote
1
answer
62
views
Craft CMS 4: Update without proc_open
I've recently managed to upgrade my Craft installation from 3.9.1 to 4.5.0. During the upgrade process I had a number of times where the update process from within the admin GUI 'failed' or at least ...
0
votes
0
answers
25
views
Craft as IdP using Saml Identity Provider Plugin
I'm running Craft CMS Pro v3.9.1.
We're trying to interface a Craft site with a partner site. The idea being that the user logs into our site with their Craft credentials then, if needed, click a link ...
0
votes
0
answers
25
views
Feed me with Google sheets and matrix fields
Our client delivered a list of products in the form of a Google Sheet.
Some products contain some extra information which should we presented in the form of a list on the website.
Currently these ...
0
votes
2
answers
42
views
CP / Backend: Restrict single entry only to admins (edit / delete)
I'm searching for an idea, to protect a single entry from being edited / deleted by editors (CP / backend).
Of course, it's easy to do for fields or sections, but for a single entry ... hmmm ...
...
0
votes
0
answers
23
views
Codeception Unit test using fullMock
I have a custom field for which I would like to write some basic unit tests. I was looking into fullMock: true since really don't need a full Craft environment. I want to test the normalizeValue() ...
2
votes
1
answer
57
views
Control Panel Date Picker: Inconsistent Date Format
In my plugin I have a datetime field defined in the settings template:
{{ forms.dateTimeField({
label: "Ends at"|t('optimum'),
instructions: experiment.isNew ? 'Defaults to 30 days ...
1
vote
2
answers
36
views
Prevent CKEditor5 from filtering out classes
CKEditor5 filters out any classes applied to HTML elements. However, I'd like to allow certain classes to be applied to <ul> elements (e.g. class1, class2) without CKEditor5 stripping them out.
...
1
vote
1
answer
25
views
Is there a way to determine an element by its path or full url instead of the uri?
I'm using Craft in headless mode. It's a multisite setup different languages. I know that's it's possible to query an element by it's uri. Is there a way to check if a full path or an absolute url ...
1
vote
2
answers
102
views
Make external links open in new tab, while internal not?
I've been going around in circles wondering which way to tackle this, so thought I'd ask while trying things out in case there's a really obvious way staring me in the face!
I have tens of thousands ...
1
vote
1
answer
61
views
Twig Runtime Error on Craft 4 Getting Started Tutorial
I'm working through the 'getting started' tutorial and I've run into an error I can't get passed. I've created the Category Group: 'Topics' and then created the Field 'PostCategories' and connected it ...
0
votes
0
answers
17
views
How to adjust entry fields to have different width based on field value in Craft CMS 4
I have created a entrytype where there are multiple sets of fields. One for each of 4 different languages.
In the entrytype i have selected a field of checkboxes and added conditional logic for which ...
0
votes
1
answer
24
views
Redirect control panel access via .htaccess
I have a website that is hosted on a subdomain, let's say: https://subdomain.maindomain.nl.
My craft content is in the maindomain/public_html/subdomain/git-module
To make it work on the subdomain I ...
0
votes
0
answers
13
views
How to prevent advanced relation field setting «Relate entries from a specific site?» getting ignored?
I have a relation field with the advanced setting «Relate entries from a specific site?».
When the user initially clicks on the field it works fine, on a second attempt the setting «Relate entries ...
1
vote
1
answer
64
views
Create deep copy of twig variable
I'm building a filter page with Craft and Sprig.
The goal is to show the amount of products for each filter.
So for example if we want to filter on color we show 2 checkboxes "Red" and "...
0
votes
0
answers
54
views
Craft cms[4.x]: Frontend Site broke after performing a feed with feed me
On our last data migration from wordpress i import through feed me all the data but the postDates.
31-08-2023 11:12 I imported a csv file in feed me with all the posts content including the postDates ...
1
vote
2
answers
64
views
Adding an assets image URL field to an RSS feed
I am creating a RSS feed from a news channel and I have gotten it all working except for the news story image which is an assets field. I want to pass the url of the image so I can pull it in via feed ...
1
vote
1
answer
82
views
I can't update the craft CMS. Returns an error
CRAFT CMS 4.5 has been released. I have updated to this version calmly. There are new updates 4.5.1, 4.5.2, 4.5.3. But when trying to update the system, it gives this error:
Ошибка: The command "...
1
vote
1
answer
46
views
Redactor: Assign data attribute
According to redactor’s documentation it should be possible to add a data attribute to a block format. The code below works except from the data-cursor part (the block is styled italic and receives ...
1
vote
2
answers
56
views
Load More Entries based on Parameter Category Filtering
so i filter some entries via the url parameters... that works fine. But if i load more entries (based on the category parameter), the result includes also all other entries with other categories... ...
1
vote
2
answers
33
views
Conditional - Apply After Every Third Loop
The following is messy and obviously not scalable. There must be a way in twig to target a common difference of 3 right?
{% if loop.first or loop.index == 4 or loop.index == 7 or loop.index == 10 %}
...
1
vote
1
answer
23
views
I want to pull content from a field on an entry into a matrix block that is displayed on that entry, is this possible?
I want to pull content from a field on an entry into a matrix block that is displayed on that entry.
I have entries that are shared between multiple sites. I'd like to be able to add a field on these ...
1
vote
1
answer
44
views
Output matrix field content into a RSS feed
I'm trying to create RSS feed for a site news section, most of it is straight forward to do but I run into an issue with the description section. That content is a sub field in a matrix field along ...
1
vote
1
answer
59
views
How to completely disable entry versioning(drafts) during editing
Obviously I disabled it in the section settings:
I just want to save the entry after making all the changes, but now it's trying to save the revision after each single change
1
vote
2
answers
57
views
Twig > for looping on objects -> only one result
Sorry per advance for my english :/
I am trying to construct an twig array in a .twig file like this :
{% set allergenesArray = [] %}
{% for allergne in recipe.allergenes %}
{% set ...
1
vote
1
answer
38
views
permission to access users only on specific user group
I would like to ask if there is a permission to view and edit the users on specific user group? or is there any plugin to do that?
example: I have user groups called "Class 1" and "...
0
votes
0
answers
25
views
Disable URL's for nested levels in structure but keep URL's for the 2 top levels
I have some products with categories that go 4 and sometimes 5 levels deep.
The site will have an overview page for the first 2 levels.
For example: my-website.com/category/subcategory
I have created ...
0
votes
0
answers
24
views
Live preview button(s) gone after enabling different domain for control panel
I'm building a Craft website which will need another domain for the control panel.
The setup for this has gone good using this article. => https://craftcms.com/knowledge-base/access-control-panel-...
1
vote
1
answer
73
views
Run craft up command in deployment pipeline without prompts
I am deploying a Craft website with Bitbucket Pipelines.
Basically what it does is spinning up a container that runs composer install and builds my CSS and JS with webpack. The vendor folder and js/...
1
vote
1
answer
42
views
Unable to Add Plug-ins via Craft Dashboard
First, apologies, I'm very much a Craft newbie. The contract we had with a vendor to manage our Craft install wasn't renewed so we're left trying to manage it internally the best we can.
We're running ...
0
votes
0
answers
17
views
Whats the best way via ImageOptimize to include images?
I have a question regarding the ImageOptimize Plugin... if i upload image files which have like 400kb... after the plugin processed them sometimes they have more kb then before! (Size settings etc are ...
1
vote
1
answer
26
views
Entry form replacing rather than appending data to a matrix field
I have this in my entry form:
{{ csrfInput() }}
{{ actionInput('entries/save-entry') }}
{{ hiddenInput('entryId', entry.id) }}
{{ hiddenInput('fields[questions][...
1
vote
1
answer
29
views
Erratic behavior with anchor tag surrounding svg image
I'm using an svg object for a logo on a site. It is wrapped in an anchor tag. In the browser, the cursor is sometimes a pointer and other times a hand (showing it is a link). It's very erratic and ...
0
votes
0
answers
28
views
Is there a way to expose User edit history in Control Panel (similar to Entries)?
"Users" version should work like "Entries" versioning work
1
vote
1
answer
43
views
Can't delete asset subfolder
I just created a subfolder to test how it works but now can't delete it. If I select it and then click the "options wheel" in the bottom, the delete button is disabled.
Is there another way ...
1
vote
1
answer
33
views
How do you import entries from a CSV
I'm fairly new to Craft CMS, and investigating how to handle exports and imports.
I noticed that on the Entries listing there's a nice big export CSV button - perfect, exactly what I need.
But I ...
1
vote
1
answer
36
views
It's possible to display "User" menu history like "Entries" menu history on admin dashboard
Or, Is there any way to modify the recent entries widget and display user history in the same widget
2
votes
1
answer
44
views
Add to an asset field from a queue job
I'm following this to generate social share images from entries: https://ghijk.co.uk/blog/generate-dynamic-social-share-images-in-craft-cms
It's working well. But I'd like to add the generated image ...
1
vote
1
answer
18
views
How is it possible to upload photo directly from mobile phone/webcam and link it to an entry?
I would like to take photos on a mobile phone/webcam and upload them automatically when the photo is taken. Currently, I'm taking photos have it saved on my local desktop and upload them manually to ...
1
vote
1
answer
21
views
How to run Sprout Forms action from a controller to implement Google reCAPTCHA?
I'm using Sprout Forms V3 on Craft 3. I'm trying to handle the submit within a controller.
This choice is made to add a custom logic, to implement a Google reCAPTCHA (as the official Sprout's plugin ...
1
vote
1
answer
64
views
Help with configuring the @webroot alias
I have a hosting account running Craft 4.4.17 with a structure like this:
home/
accname/
craft's usual files and folder arrangement
domainname.tld <-- web root
index....
1
vote
2
answers
35
views
Group entries by custom fields
I have a section for addresses which has fields for address, state, suburb and postcode. On the front end, I want to display them like this:
State 1
- Suburb 1
-- Address 1
-- Address 2
- Suburb 2
-- ...
1
vote
2
answers
169
views
Craft 4, CKEditor 5, image resizeOptions not showing in image toolbar
I'm experimenting with all the CKEditor 5 config options and I like how the docs have the image resize (https://ckeditor.com/docs/ckeditor5/latest/features/images/images-overview.html#image-contextual-...
0
votes
0
answers
18
views
CP routes are suddenly prefixed by /web/ directory
I've deployed my website for a second time but there is a problem now..
When I navigate through my page, everything works fine apart from one page that fetches a graphQL query, but this returns an ...