All Questions

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

Error on plugin settings page: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

I've installed the latest CraftCMS version via composer. When I'm visiting the plugins settings page (/web/admin/settings/plugins), I get the following error message: preg_replace(): Passing null to ...
Odin's user avatar
  • 1
0 votes
1 answer
21 views

Migration failed - table already exists

I'm stuck in a "migration" that is trying to install a table which it clearly didn't check for (because yes, it is quite already there.) When I remove the table and allow the migration to go ...
Caroline Blaker's user avatar
0 votes
1 answer
15 views

How to use the primary locale handle as a fallback in the url?

I'm working on a Craft 4 project with five languages set up as separate sites. The primary site is configured to use 'en-GB' as the language and 'en' as the handle. Currently, when I access the home ...
Mark Notton's user avatar
  • 2,317
0 votes
1 answer
13 views

How to call and print only Event Types of Event Plugin

How to call and print only Event Types (title and handle of event types) of Event Plugin -> https://verbb.io/craft-plugins/events/features
user14621's user avatar
1 vote
0 answers
17 views

how to add an if to open an external link in the menu

I have a code that I am using to make the menu I created in Craft CMS work. In my menu, I have direct and indirect links. and I also have a child option that uses an EXTERNAL link. In other words, the ...
Ana Viana's user avatar
0 votes
0 answers
17 views

como adicionar um if para abrir um link external no menu [duplicate]

eu tenho um codigo que estou utilizando para que o menu que criei no Craft CMS funcione. No meu menu, possuo links diretos e indiretos. e tenho também uma opção de filho que usa um link EXTERNO. ou ...
Ana Viana's user avatar
1 vote
1 answer
269 views

My site has been hacked. I have managed to clean it up. But now, most of my links are looping back to the home page

My site was hacked by a Russian hacker. I know because the characters were Russian on one of the files he left. I have cleaned up the site, but many of the links are looping back to the home page. ...
Alex Briones's user avatar
1 vote
1 answer
31 views

Craft 4 DB connection works in WEB context but not from Craft's console command

We just completed an upgrade from Craft 3 to 4 (latest version) and now all web requests (FE+CP) work, but not the console commands, it can not connect to the database ./craft users/list-admins ...
Matthias Redl-Mann's user avatar
0 votes
0 answers
8 views

How does use the Bulk Resave Elements command with checkbox group fields?

I recently added a Checkbox Group with 3 options to a Section. By default, I would want the checkboxes to be checked, and to allow the author to uncheck them as needed. To apply the above "...
Sandwich's user avatar
  • 626
0 votes
0 answers
16 views

Migration of entries to a different channel. Deleting old channel deletes moved entries

I've written a migration which successfully moves entries to a new section. The problem is that if you delete the old empty section, the moved entries are removed with it. Before Migration: Section 1 &...
jpwdesigns's user avatar
1 vote
1 answer
29 views

Fixing Craft deprecation errors general question

I want to fix some deprecation errors on my site but would like to know a little more about how this works so that I know they are actually fixed and I haven't just cleared/hidden them. If I visit a ...
Helen Connole's user avatar
2 votes
2 answers
533 views

Monolog Logger error

<Irrelevent preliminary context> Somewhere in the process not understanding modules and whether they get to have Variable classes, and running php craft make module and composer dump-autoload -a ...
kr37's user avatar
  • 1,335
1 vote
2 answers
138 views

Stop customers from increasing line item

I have a site where the owners want to stop customers from ordering more than 1 type of item. The Twig logic is already in place to stop any forms showing that would allow customers adding more than ...
Jaytrix's user avatar
  • 187
2 votes
1 answer
41 views

Wildcard searching for custom field queries

I've noticed that the * wildcard works for simple custom field queries, for example if I have three entries named Foo, Foo*, Foo*Bar, running craft.entries.title('Foo*').all() will get 3 results, and ...
gioppe's user avatar
  • 414
1 vote
1 answer
38 views

Money field with dynamic currency selection

I'm working on a multi-lingual site and we need to output costs for products. This is NOT a Craft Commerce site however. I need to show different costs per site depending on the location and different ...
SplendidRob's user avatar
1 vote
1 answer
37 views

Sprig request Getting 414 Request-URI Too Long

I have sprig components on multiple pages, Some are working fine but some get '414 Request-URI Too Long ' Looking at the networks tab, it sends many elementId={ids}&CRAFT_CSRF_TOKEN={token} after ...
Prashant sharma's user avatar
1 vote
1 answer
36 views

Contact form plugin: Unable to verify your data submission (in Safari and Chrome)

Description I am using the contact form and it works in my Brave browser but in Safari and Chrome the form will not send. It used to work fine, so I don't know what has changed. If there is a quick ...
Matthias's user avatar
  • 110
0 votes
1 answer
34 views

Next previous page links

I'm working on a reviews site where each entry has a series of fields, but on the front end, different pages are used depending on whether fields have values in them or not, e.g. if fieldX has data, ...
Tyssen's user avatar
  • 643
1 vote
1 answer
35 views

How to make AJAX request to controller inside module?

Created a new module to receive form values and process API in Craft CMS 4. How to make an AJAX request to access a controller in my module? module name - giftcard controller - GiftCardController ...
Shankar's user avatar
  • 11
1 vote
1 answer
28 views

Omit specific URLs from the sitemap

I want to exclude certain URLs from the sitemap, depending on the custom field settings in their corresponding entries. I'm using SEO Matic plugin in craft4
Thangaraj Moorthi's user avatar
1 vote
1 answer
23 views

Entry URI Format from an Entries Field (Categories)

i am trying to set the url format for some entries to include the category slugs set for it within a category entry field - i can get the first one like this {eventCategory.one().slug}/{slug} but ...
Malcolm Maclean's user avatar
0 votes
0 answers
27 views

Craft Commerce Orders - Customise Sources

In the backend, under orders, is there any way to create a custom source based on a particular product that is purchased? My customers will only ever be purchasing 1 product as there is no basket, ...
Chris Nicholson's user avatar
1 vote
1 answer
23 views

Craft Commerce Missing Products Tab

I've just installed the craft commerce plugin to trial it, but I'm not seeing the products tab under Commerce in the backend? Am I missing something? I'm using Craft 4.5.10. Thanks, Chris
Chris Nicholson's user avatar
1 vote
1 answer
27 views

showing content conditionally in layout

I'm trying to conditionally show some content inside the layout file. In my entries I have a lightswitch field - to indicate which entries should be excluded. This all works fine when I can identify ...
glider's user avatar
  • 647
0 votes
0 answers
14 views

Setting title in Instant Analytics GA4

I’ve installed Instant Analytics GA4 (https://nystudio107.com/docs/instant-analytics-ga4/) The default title is the template (which is a bizarre default IMO) as a result all of my analytics are ...
mitrol's user avatar
  • 252
1 vote
2 answers
33 views

clickable link in Formie notifications

I have a Formie form on my site where users can request a white paper. After filling in the form, their browser opens the PDF in a separate tab. I also want to send the user a confirmation email with ...
Dustbunny's user avatar
1 vote
3 answers
63 views

Debug Toolbar Not Displaying on frontend

I just updated a site to Craft 4 and the debug toolbar no longer shows on the frontend, but does show in the CP. Have not had this issue with other sites that were updated. Any ideas?
Roi Agneta's user avatar
  • 1,413
1 vote
1 answer
59 views

Craft + FeedMe update

I'm trying to update Craft to 4.5.10 which requires PHP 8.0.2+ but I have Feed Me plugin installed, which is using Cakephp 3.10.5, which requires PHP >=5.6.0,<8.0.0. Is it possible to update ...
Michal Bulla's user avatar
0 votes
1 answer
44 views

Transfering content from my local docker environment to production

For the second time, I've created a website with CraftCms. This time, I used my windows computer to setup the project but I had to use docker. Fyi, I'm not experienced with docker, but I was ...
Stef Verniers's user avatar
0 votes
0 answers
21 views

Limit External API Calls From Plugin In Craft 2

I have a plugin in Craft 2 that will make an API call to an external API to gather and display data on a template; however, I would like to limit the number of calls to a certain number per second (or ...
buck1112's user avatar
  • 390
0 votes
0 answers
32 views

Sprig "View Less" Button

I'm trying to build off the "Load More" button, and essentially "Load Less" by reverting back to the initial state. The code below resets it back to 0 and just starts load from the ...
JMKelley's user avatar
  • 1,374
1 vote
2 answers
37 views

How to change the name of an entry?

I'm new with CMS and I'm not able to change the name of an entry (single). How could I do that? Thanks in advance! Vincent
Vincent's user avatar
  • 11
1 vote
1 answer
48 views

Tables not created when plugin installed

I've got a plugin that works on Craft 4.5. It's been installed a long time, upgraded from 2.x to 3.x. Now trying to use it on a new install of Craft 4.5.10, installing it does not create any tables. ...
kr37's user avatar
  • 1,335
0 votes
1 answer
28 views

I'd like to create a Wishlist and save it into a cookie, instead of having to login

I'm a bit lost. I'd like to create a wishlist for products and save them into a cookie. I don't want anybody to have a login and I don't mind if the list is not sharable and only available on the same ...
outline4's user avatar
  • 595
0 votes
0 answers
19 views

I get a 404 not found when going to my site url, but content will show when navigation to url/craftfolder/web

I've made for the second time a craftCMS website. But is goes wrong at the deployment. After many times of trying, I got it kinda working when going to siteurl/craftfolder/web. In that case the ...
Stef Verniers's user avatar
1 vote
1 answer
24 views

how do I change entry from draft to live?

I have an entry showing as draft but I would like it to go live. I have looked but can't work out what I'm doing wrong.
Liam's user avatar
  • 11
2 votes
1 answer
39 views

How to Escape a Query Parameter

Extremely not a PHP developer here but trying to set up a simple API with Element API. I've got the basics working to filter my entry results based off of a query URL parameter: use craft\elements\...
kmgdev's user avatar
  • 1,169
0 votes
0 answers
22 views

Multiple errors attempting to migrate MariaDB Craft CMS 3 database to PostgreSQL via pgloader. Alternatives?

I've been at this for a couple days now and it's not looking good. I'm trying to migrate a Craft CMS 3.9.5 (latest) database running on MariaDB to Postgres using pgloader 3.6.10. I've attempted this ...
CBallenar's user avatar
  • 111
1 vote
2 answers
25 views

Range filter doesn't accept variables

How do I pass variables into the range filter from a static supertable field? {% for item in variants.b2bProductQty %} {% set start = item.selectRange.cellStartInteger %} {% set end = item....
KSPR's user avatar
  • 3,776
5 votes
2 answers
170 views

Craft loses contact with database, and stops daemon

Somehow the queue/listen occasionally loses access to the database: FATAL Exited too quickly . Database Connection Error: Craft CMS can’t connect to the database. As the connection is lost, it ...
Eddie's user avatar
  • 51
1 vote
1 answer
37 views

Create section 'landing page' with 'two column block'

I'm very new to Craft 4. I have a matrix 'Landing Page Blocks' I've created 2 Block Types: Hero Block and Two Column Block Within the 2 column Block I need a left and right content block Within the ...
user3086053's user avatar
0 votes
0 answers
13 views

Freeform Table field - dynamic data?

I am looking at using the Freeform Table field (https://docs.solspace.com/craft/freeform/v4/overview/fields/#table) and it works great. However it only seems to use values for dropdowns that you enter ...
Malcolm Maclean's user avatar
1 vote
1 answer
29 views

Craft sites not stored in project.yaml

Today I installed a Craft project (Craft version 4.5.9) onto a new server (git pull, manualy copy of web/assets, composer install, db dump import, craft up). Everything runs fine except one thing: The ...
Moritz's user avatar
  • 69
0 votes
0 answers
22 views

Craft Commerce: Sell digital products from pool of predefined license keys

We’ve been asked to build a shop to sell e-books. The e-books are published by a third party and we will receive a list of pre-defined license keys (thus stock can run out). The plugin Digital ...
Moritz's user avatar
  • 69
1 vote
1 answer
36 views

Session token error/missing after server switch

I am duplicating a Craft 3 site from a production environment to a dev environment (local with MAMP Pro). On the "new" dev site I can't log into the control panel. The credentials are valid ...
Kirk Roberts's user avatar
1 vote
3 answers
108 views

How to code a downloadable ICS file for an event

On an events website I'd like to add a link to add an event to a vistors calendar. So when they are looking at the details of an event there would be a "Click to add to your calendar" button/...
Paul Frost's user avatar
  • 1,048
0 votes
0 answers
28 views

Frontend Authentication with GraphQl on different domain

I want to build a headless craft-cms site. Frontend is on mydomain.com, backend on login.mydomain.com However, i want users to login in the frontend and create a session there. Only logged in users ...
Juice's user avatar
  • 1
1 vote
2 answers
46 views

Cleaning up twig query with nested and/or where

I have troubles understanding the nested twig query syntax. It works fine in PHP code but somehow when using twig I never seem to get it right. This is my raw, dirty query which I want to clean up a ...
bartpulse's user avatar
1 vote
2 answers
39 views

Sending transformed image sizes to Algolia

I'm investigating using Algolia for a search page on a site where the entries have a single main image assets field where the file uploaded is quite large. Transforms are performed in the Craft ...
Tyssen's user avatar
  • 643
0 votes
0 answers
52 views

Migrating from CraftCMS to Wordpress (Metadata question)

My company is working to migrate 7 websites into a single integrated website. However as we are migrating this with our CMS partner we are seeing that no metatitles and metadata are being transferred ...
user14503's user avatar

15 30 50 per page
1
2 3 4 5
286