Trending questions
14,621 questions
0
votes
1
answer
20
views
Factors that influence rendering time and memory consumption
We are currently trying to improve one of our project's performance and therefor I try to understand factors that influence a page's rendering time and memory consumption.
Before optimizing complex ...
0
votes
0
answers
7
views
How do I make a link clear a sprig variable and trigger a reload?
I'm using Sprig to filter a set of results. The filter values are shown as 'chips' which - when clicked on - remove that filter selection.
I know I can re-render the component with a simple sprig ...
0
votes
1
answer
14
views
How to make asset path work for nested matrix asset fields
So I have one asset field used in three contexts:
asset field directly in the entry { slug }
asset field in a matrix field { owner.slug }
asset field in a nested matrix field: { owner.owner.slug }
...
0
votes
1
answer
9
views
Craft cache for latest articles block - when there are 3 instances of it. What is the best approach?
I have a block of code at pulls in the 2 latest articles and ensures not the article of the current page.
I want to cache this as a separate piece of content, to ensure the whole article is not cache ...
0
votes
0
answers
8
views
Craft Commerce getShippingCategory() returns null
I have a Craft Commerce store up and running — everything was great.
I got tangled up in the Shipping Methods — a small parcel shipping method was appearing when it shouldn’t. So I figured I’d delete ...
0
votes
1
answer
43
views
Failed Craft update to 5.7.3
Updated from 5.7 and got an error: /var/www/html/public/craft-resources doesn’t exist.
I tried restoring to the pre update state, but the error persists. The error message includes this line:
throw ...
0
votes
1
answer
33
views
Excluding entries with a certain category from a query
I'm trying to build a search page on a Craft 3.x site that returns results based on values in the query string. That part I've got working OK with the code below:
{% if craft.app.request....
0
votes
1
answer
64
views
Composer dependency conflicts in updating to Craft CMS breakpoint version 3.7.27.2
I am trying my darndest to update an older site (Craft v3.5.15.1) in light of the recent critical security vulnerability warnings, but all my update efforts in both development and live environments ...
0
votes
1
answer
24
views
Update failes on shared hosting; php not found
I transferred a site running with Craft 5 to a shared hosting environment. When I try to update Craft via the CP, I get the following error
Error: The command "'php' '/home/xyz/storage/runtime/...
0
votes
1
answer
18
views
Delete all entries: console command not working
I have a lot of test data I now want to get rid of. Using the CP, I can only select 100 entries and delete them, this is not very practical for me.
I found out, that there is a Console Command ...
0
votes
1
answer
27
views
Preview in a Craft 5 multisite setup
I am developing a multisite project in Craft 5. There are three different sites, each with their own unique domain. Each site uses the same templates, but each has its own unique content, e.g. they ...
0
votes
0
answers
10
views
How to determine if an entry is new or a published entry on the entry edit page
I want a lightswitch to default to on if the entry is new. I originally checked for whether or not $entry->postDate is null, but postDate is already defined set to what seems like the timestamp ...
0
votes
2
answers
28
views
Google search console complains about urls containing x-craft-live-preview
We have been having issues with a website that is receiving a poor indexing score on the google search console.
One of the issues google complains about is that we have 60K links that have a no-index ...
0
votes
2
answers
29
views
How to render js with the proper namespace using asCpScreen()->contentHtml()
I have a slideout that tries to render an EditableTable field. Everything almost works but the slideout namespaces the HTML with a random prefix and does not do the same to the JS so the JS doesn't ...
1
vote
1
answer
56
views
Craft CMS 5 Ddev local build suddenly giving 404 page
I recently deployed a local Craft CMS install to our server and took several steps to prepare, including setting the site offline using an offline.php template and configuring a .env file to connect ...