All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Plugin not able to install

Trying to install the redactor plugin through the plugin store throws the following error Error: curl error 28 while downloading https://composer.craftcms.com/packages.json: Resolving timed out after ...
0 votes
1 answer
11 views

Add an Object key and value to an exsiting object

I am looping over an array of objects and trying to add a new Key and Value. I keep getting a host of errors so was hoping someone could help a little with formatting this loop. {{ set = transforms: [{...
  • 299
1 vote
1 answer
10 views

Is there an Event that detects when all templates have been processed?

I'm working on a Content Security Policy and need to set an HTTP header after all templates have finished processing. Right now I'm doing that by calling a module variable at the bottom of the main ...
  • 468
0 votes
0 answers
9 views

Craft Commerce PayPal Checkout: Error: Expected an order id to be passed

I am having big trouble getting the PayPal checkout plugin to work. I am using this code: {% namespace cart.gateway.handle|commercePaymentFormNamespace %} {{ cart.gateway....
0 votes
1 answer
13 views

Siteground hosts file issue with Craft

I’m deploying a Craft site to a host I’ve not used before (Siteground). I ran the server check via SSH and everything came back green. Apart from the PHP version which it said 8.0 was the minimum, and ...
  • 176
1 vote
0 answers
13 views

How best to merge an array into an array for a relatedTo query parameter?

I have 3 Matrix fields which define optional parameters for building a query: A related Entries field A Categories field A Tags field Any combination of them could be used, including none or all. So ...
0 votes
1 answer
17 views

Get Entry Slug from specific Locale

I have a multilingual entry setup using different sites for each language. I want my assets sorted by slug, but since the slugs are different in each language, all assets are saved three times. My ...
  • 11
1 vote
0 answers
28 views

Search query working locally, but not in production

I noticed that search (both on the public website and in the entries admin area) was not searching a given field. I checked the field and noticed that the "Use this field's values as search ...
  • 203
0 votes
0 answers
14 views

Upload Image in Craft CMS on Server

When I upload image in server I get : stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given
1 vote
0 answers
10 views

Structure entries not displaying in date order within search results

I have created a search results page to display matching entries to a search term, ordered by the most recent. The set-up works well for all entries which are not part of a structure. Results of ...
1 vote
0 answers
17 views

Updated to Craft CMS 4.2.5 and now the "New Category" button is missing in Control Panel [closed]

Like the title says. I've just updated to the latest version while building out a new site in Craft CMS and the New Category button is missing from the Categories screen in the CP. Both when you go to ...
  • 11
1 vote
0 answers
4 views

Multilingual setup with different content structure per language

We'd like to setup a multilingual site with a parallel structure but different content per language. The content will differ specifically in the matrix fields that there will be. For example, German &...
  • 11
1 vote
0 answers
27 views

Using tokens to authenticate a one-time download link?

I am trying to create a download link to an ASSET in craft that I can send via email - the client clicks the email link (which has a token query string attached to validate the link) and is presented ...
  • 299
0 votes
1 answer
21 views

How to sort database values using other variable

I am fetching data using the custom slug in craft commerce products but I am not getting the sequence of the products which I am providing in the custom slug Here is the code for that. slugs = "...
0 votes
1 answer
25 views

Git GUI for interacting with changes to files on remote server

I work on a site that is set up with the staging site being the main site where changes are made and then the database and all files are copied over to the production site when those changes are ready ...
  • 509
0 votes
1 answer
13 views

Commerce: Calling unknown method error on Edit Address screen

I'm using Commerce 3.4.16, Craft 3.7.51. I'm able to enter an address as part of checkout, and I can see that address in the CP, but when I go to the edit address screen on the front end, I get this ...
  • 960
0 votes
0 answers
8 views

Is it possible for a plugin to add a link to the list of save actions in the entry edit control panel page?

I would like to add a new horizontal line and link within the Save options menu as pictured here. My use case is to add a link called "Save and send for localization" which will be used to ...
  • 155
0 votes
0 answers
4 views

LastInvalidLoginDate returning NULL, or current date if formatted

I'm wanting to show a user's last invalid login date within the control panel. No matter the value in the database, it comes back as NULL, unless I try formatting it as a date, then the current date ...
  • 186
0 votes
0 answers
22 views

Asset subpath to top most parent

For the asset subpath in the assets field – is there a way to store assets to the top most parent slug? I have a site built up as a multi-layered structure and want to group all assets by their top ...
  • 11
0 votes
2 answers
15 views

Macros: Variables inside of variables

I have a slightly mind bending question. Here's my setup: file.twig {% set entries = craft.entries({ section: 'events').all() %} {% set tileContent %} <p>{{tileEntry.title}}</p> {% ...
  • 367
1 vote
1 answer
32 views

Adding New Matrix Block via Frontend in Craft 3

Referencing https://craftcms.com/docs/3.x/matrix-fields.html#saving-matrix-fields I believe I did this correctly according to the docs and other posts here. My Matrix field is able to save edits, but ...
0 votes
1 answer
25 views

Admin login not working on production

My admin username is not working on production. It works locally. I can change the password and add a new admin user, which works fine locally. Has anyone run into this before? Prod is on a ...
0 votes
0 answers
11 views

What's the difference between batch() and paginator class?

What is the difference if i use for example: Record::find()->select(['id'])->batch(10); or $query = Record::find()->select(['id']); $paginator = new Paginator($query, [ 'pageSize' => ...
  • 53
0 votes
2 answers
41 views

Queue is failing

I have an issue with queue running... It always fails. The same with image transforms and so on...
0 votes
1 answer
19 views

Settings and Plugins 'missing'

They were there previously, and the site admin is not responding. Is there anything I'm able to do?
0 votes
2 answers
38 views

How to reuse "functional code" in multiple twig files

I usually load and prepare data before calling a certain include. That data may be loaded in a certain way for different cases, so I cannot add that data preparation code into the include itself. I ...
0 votes
1 answer
21 views

What fields are eager loaded by default in Craft Queries?

I'm testing the DB queries required for a Craft query and I realized that adding the title field to the eager loading doesn't change anything. So it seems like the title is retrieved by default. Means:...
0 votes
1 answer
16 views

Get entries where tag = value

Let's say I have a tag group with handle genre. I can make an entry contain information about this tag by creating a field of type tag that uses this group. So I would have a field with handle ...
0 votes
0 answers
16 views

Custom Element Index stopped working after Update

So we had an "old" Craft 3.1.* instance that i needed to update. Which is now running on Craft 3.7.20. This instance does have a Module which introduces a new ElementType with its own custom ...
  • 369
0 votes
1 answer
23 views

Feedme Plugin: Why won't it give me a pagination URL option?

I have a JSON field that I've setup with the following structure: { "pagination_url": "https://myapi.com?pageNumber=2", "items: [ {"thing": "...
0 votes
2 answers
41 views

How to dispatch equally entries from different channels?

I have entries from two different channels, where each channel has a different total of entries, and I want to display them equally by batch. Example: Channel #1 | Channel #2 | Channel #1 Channel #1 | ...
0 votes
0 answers
24 views

Express Forms: Insufficient form data posted error

I am getting an error each time that I try to submit my form, I am not sure what I am doing wrong. If I scroll down on the error message I can see that the page is capturing the information I am just ...
0 votes
1 answer
26 views

Get Navigation Node by Custom Field

I wonder if it's possible to query navigation nodes by custom field when using the Navigation plugin by Verbb. I haven't seen it in the documentation. Suppose I have a Navigation menu with a field ...
0 votes
0 answers
31 views

Reset-password not working online

I ran into an issue, I have a reset-password page for users who forgot their password. When testing locally everything works fine, the e-mail is sent. But now the site is put online and out of nowhere ...
  • 19
1 vote
1 answer
28 views

Load video on hover in craft cms

I have a slider in my craft website where images are showing as item. When I hover on image it will display none and video will play. There are lots of video files. So when i refresh the page then it ...
0 votes
2 answers
27 views

How to trim each string in an array?

I am looking for how to trim each string in an array, in Craft 3. I would like to check if a string is in an array of strings. The array is from a form submission, a checkbox group. For example, there ...
  • 401
1 vote
1 answer
16 views

Craft 3, Multi site setup - Update title for entry 1 site only

My setup: Craft 3 installation with a multi-site setup. 3 languages, all enabled. I have a custom plugin with a custom element type, FooBar that extends the Element class and a custom FooBar field ...
0 votes
1 answer
34 views

Loop last error getting entries

Craft 4 Key "last" for array with keys "parent, index0, index, first" does not exist. When using {% if loop.last %} Data is there and printing out a menu but cannot seem to get ...
  • 1,900
0 votes
1 answer
18 views

GraphQL fields with applied typogrify - any suggestions?

we love CraftCMS and also typogrify plugin with Twig filter "|typogrify". Now we are starting a web project that will combine Astro and CraftCMS will be used headless with the use of GraphQL ...
0 votes
1 answer
39 views

How to update a field in CRAFT CMS?

please help me find a solution. Or at least tell me where to read about it. Task: There is a PHP file price.php . It has one variable, for example $price = 100; I created the "store" section....
  • 1
0 votes
0 answers
29 views

GraphQL category count by slug

I created categories in craft and I'd like to get total amount of entries related to individual category. Right now I have a query that returns my categories: query categoriesQuery { categories(...
0 votes
1 answer
26 views

How do I add an element to a section from the site?

I use Craft CMS 4.2.3. I can't find information on how to add an element from the site to a certain section. Please help me solve the problem. It would be very cool if it were some simple example. ...
  • 1
0 votes
1 answer
27 views

Site hangs without error and kills dev server

I have a strange issue on my local development environment and am unsure how to diagnose it. I have very minimal ability to read logs, but I've had a glance and can't see anything related. Essentially,...
  • 145
0 votes
1 answer
22 views

How to find if there is a draft for a particular entry in control panel plugin

I am trying to display a notification to the user in CP, if the entry is having a draft so that the next user won't redo/overdo the other draft. For that how do we find the entry has drafts?
0 votes
1 answer
15 views

List Commerce products by category with a custom order

I'm using Commerce for the first time (v3), and I'm trying to display entries sorted by category in a custom order. I followed the Knowledge Base instructions for setting up a Commerce Products field, ...
  • 960
0 votes
1 answer
24 views

Structure entry with no URL

I have an entries Channel with about 100 entries that I need to be able to custom order in CP. Changing the channel to a structure seems to be a good potential solution for that. I would also like ...
0 votes
1 answer
28 views

Accessing eager loaded Collections data

So I have a query to return series. At the same time I eager load the series client. {% set series = craft.entries() .section('series') .inArchive(false) .with('client') .collect() %} ...
0 votes
0 answers
8 views

How to access an SVG file via GraphQL

I would like to insert an SVG tag directly into my Markup in order to make changes after the file was uploaded
0 votes
1 answer
22 views

Custom fonts in pdf

I want to render two custom fonts in my commerce pdf, but it does not work. I tried it in several ways: I use the @font-face and used the path as well the URL and also put the font files in different ...
  • 129
1 vote
0 answers
22 views

cannot create matrix in craftcms 4.2.3

I just created a fresh project with craftcms 4, but am running into issues creating a matrix. Even with just one block field. It gives me the error Cannot assign string to property craft\models\...

15 30 50 per page
1
2 3 4 5
277