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
0
votes
0answers
11 views

Craft CMS image src error

Good morning, I have inherited a Craft CMS site from a previous developer, and am running into issues when looking to add images to the site. Following instructions I grabbed the copy of the SQL ...
0
votes
0answers
20 views

How to load more entries of a category on that category's page with Element API?

Following up on previous questions of mine: How to use multiple different instances Element API "Load More" button? I have a website that utilizes the "load More" (button) method ...
0
votes
0answers
11 views

Programmatically / with plugin create new categories and nested categories

In a custom plugin, I'm able to easily add a new Category: Parent Category Code: if ($category[1] != '' && $category[1] != -1 && $category[1] != 0) { $categoriesData = \...
2
votes
3answers
395 views

Is it possible to stop Craft from logging so much?

I've got a Craft CMS installation that is set to production mode. I notice that my logs get flooded with a bunch of entries which don't seem very useful. For example, in a matter of several days, I'...
0
votes
0answers
10 views

Building a tab component in a matrix content builder - child matrixes with SuperTable plugin

There are similar questions and answers, but I'm not finding any that are answering my specific questions. I've built a content builder with a matrix in Craftcms like these tutorials have gone over. ...
0
votes
0answers
20 views

404 error when trying to access a module controller action

I’m creating a module for a site for the first time and I’m having some trouble figuring out how to get the correct action url for my controller. I’m using this template for setting up the module: ...
1
vote
2answers
31 views

How to use different date format in front end form?

I have a date field on a front end form, currently with this HTML: <input class=" date-picker startDate" type="text" id="startDate" name="fields[startDate]" ...
0
votes
1answer
39 views

Is there a guide for using Craft Commerce headless?

I’m trying to figure out the work involved in using Craft Commerce in a headless setup. Is it possible? I think so. How do I expose the Commerce functionality via an API, instead of through Twig ...
1
vote
1answer
53 views

Load More Entries Button

I am trying to make my entry loop have a load more button, and not sure how to do it. I tried the method from http://craftsnippets.com/articles/infinite-scrolling-and-lazy-loading-with-craft-cms but I ...
1
vote
0answers
22 views

Generate PDF Receipt in Craft commerece causes error in dompdf

We are using: Craft 3.4.20 with Commerce 3.1.4 and PHP 7.4.6 We tried to generate a PDF of an order with default settings and template in cp We got following errors: yii\base\ErrorException: Invalid ...
1
vote
1answer
40 views

How to use multiple different instances Element API “Load More” button?

Following up on a previous question of mine: How to skip the first few entries in a "load more" scenario with Element API? I have a website that utilizes the "load More" (button) ...
4
votes
2answers
33 views

Import Stripe subscriptions into Commerce 3

Is there a straight-forward way to import Stripe subscriptions into Commerce 3? I had hoped FeedMe or similar would do it, but it seems not: https://github.com/craftcms/feed-me/issues/472 Any help/...
1
vote
1answer
24 views

How to skip the first few entries in a “load more” scenario with Element API?

I have a website that uses a "load more" button. The process for this button can be found here: http://craftsnippets.com/articles/infinite-scrolling-and-lazy-loading-with-craft-cms I made it ...
0
votes
0answers
10 views

Test mail fails, no valid recipients

One of my sites does not send mail. When testing the email settings (using the test button at the bottom of the email settings page), I get an error. My log file shows this error thrown in Mailer.php. ...
1
vote
1answer
28 views

Getting invalid verification code for email confirmation

I am using Craft CMS as a backend for react Next app. On our live site we are sometimes getting complaints from the user about error when user try to verify code sent in the email. This case doesn't ...
0
votes
0answers
14 views

Craft CMS + Nginx redirection

I am using the latest version of Craft CMS with Nginx server. My problem is, in my site settings i setup 4 websites that are as below: German (de-de) [default] German English (en-de) Austria (de-at) ...
1
vote
2answers
400 views

Craft CMS 3 Installed but not working

I have a remote repository with a Craft install and am trying to pull it to a new environment. I run the composer install and Craft & other packages install seemingly correctly, added the .env ...
0
votes
0answers
12 views

Shipping Rules and Shipping Categories

I'm trying to set up some shipping rules. I've created a new shipping category called "Sample" I can apply it to the product fine. When I set the rules I want and then head to the checkout ...
1
vote
1answer
48 views

Weird issue with craft/setup command

I have been trying to install Craft CMS on Windows. I tried composer: composer create-project craftcms/craft d:\temp\craft After that when I try to craft setup there is a loop on the console which ...
1
vote
1answer
73 views

PHP Core Warning – yii\base\ErrorException Module 'newrelic' already loaded craft 3

I upgraded Craft 2 to Craft 3.3. Sometimes I am getting an error in admin like below when saving entries or taking some URL. PHP Core Warning – yii\base\ErrorException Module 'newrelic' already ...
1
vote
1answer
19 views

Why is it when I update an entry within a structure in the admin, it reorders it to the bottom of the list?

I've created a structure and I have about 15 entries in it. They are grouped under an entry named "0234" and each entry below it is named 0234 A, 0234 B, 0234 C, etc. I would like to keep ...
2
votes
1answer
85 views

How to check an entry is in a section within a for loop

I need to display different information depending on the section the entry comes under when I'm displaying all entries within a loop. Use case - I have a feed which will pull in all entries such as '...
1
vote
2answers
38 views

How to use entry data?

My question: How can I use entry data in the craft backend? An example for the use-case: Author creates an entry for the section "Generate item". The entry has only a title/single word. ...
0
votes
0answers
14 views

Overwrite Matrix data programatically and save

I'm working on a translation plugin. Now I want to translate fields in a matrix and save it to the right site (language). This plugin is called in a after save event. It gets the value of the Dutch ...
1
vote
1answer
36 views

Localization Section propagation settings, and related entry field setting “Manage relations on a per-site basis”

Craft 3.4.20. Site is running multiple localizations Sections: Blog Post Propagation method set to, "Save entries to all sites enabled for this section" Blog Category (Structure entry with ...
1
vote
1answer
17 views

Where can I set how the pagination links render?

I have inherited a Craft 3 project in which the pagination links render with a query parameter "page": https://mysite.com/blog/?page=2 but this makes crawlers like HREFS to ignore the Next ...
1
vote
1answer
29 views

I am trying to have a vertical tab with hidden content

In Craft 3, I am trying to build a vertical tab categories using href=#sample and the hidden content id=sample. I am using bootstrap JS as my library. Here is the code I use. I somehow not managed to ...
1
vote
1answer
19 views

How to auto enable a plugin after install?

I am developing a plugin for craft 3 and the plugin just got published to the store. I can browse through the store and install the plugin but it stays disabled. The user will have to goto Settings -&...
1
vote
1answer
25 views

Get field type in templates

I need to get the field type in my templates like I used to do: field.getField.type but that does not seem to be working in Craft 3 anymore. The result is always null. It also seems that the »type« ...
1
vote
1answer
16 views

Controller redirect not working in craft 3

I am working with Craft 3 and in my controller, I am trying to do this $this->redirect('https://foobar.test'); But it is throwing me back to the root url of my craft site. I am confused, what else ...
1
vote
1answer
26 views

How to define table attribute in the record file

Following code is working on Craft 2: class My_TableRecord extends BaseRecord { public function getTableName() { return 'my_table'; } protected function defineAttributes() { return [ ...
0
votes
0answers
19 views

Control panel search on frontend

How difficult would it be to replicate the control panel search on the frontend of a Craft site? I currently have a standard Craft search as shown in the documentation but it's a little slow as I have ...
1
vote
1answer
37 views

Checking which version of Craft CMS a site is using

I've been asked to look at Craft CMS site where my would-be client has been ghosted by his previous developer. I have no handover information and only FTP and phpmyadmin access presently. Looking ...
1
vote
1answer
23 views

How to get my craft projectConfig settings inside JS on the front end

So I am trying to work with twig templates and I want to inject my project configuration in my js so I can use it. I can do this {% set admin_email = craft.app.projectConfig.get.email.fromEmail %} ...
1
vote
1answer
24 views

Get entry by language in a module

I'm trying to get some auto translating done in a craft module. In order to do this I need to get the entry of another language in a save event. Is it possible to get this by language? Event::on( ...
1
vote
1answer
18 views

Register custom REST routes while building a plugin for Craft 3

I am building a custom plugin for Craft and I am hitting some REST APIs in my backend service to fetch some data using Ajax calls in JS. What I would like to do when the AJAX calls complete and come ...
1
vote
1answer
20 views

What is the best way of managing multisite propagation post setup phase?

I have a multisite setup with a pages section. In the future we want to add additional sites but there seem to be some caveats. When we first setup pages we set the section propagation to 'all other ...
0
votes
0answers
20 views

How to write multiple operator condition in where statement of db query

$query = (new Query()) ->select([]) ->from(['{{%custom_table}}']) ->where(['<=','firstDate', now()]) ->all(); In craft3, I want to add multiple ...
1
vote
1answer
67 views

Graphql total results / pageinfo when searching with pagination

I'm trying to build something to search my data that is stored in Craft with graphql. To make pagination work I want to know how many results there are in total. I'm doing a query like this: query($...
1
vote
0answers
38 views

Test Craft Plugin without the use of a database

We'd like to add Unit Tests to our Craft Plugin. I have used the Plugin Factory generator to generate the files and the basic setup seems to work. I am however struggling getting the tests to work ...
1
vote
1answer
21 views

Flush Compiled Templates Migration File breaks Craft Migration Setup from 3.0 to 3.3

I was attempting to upgrade my Craft CMS from 3.0 to 3.3.19 on my production site. I had tested this out on several dev environments and worked with no issue. However, when doing it live I ran into a ...
1
vote
1answer
33 views

How to use createFromString() in Craft 3

In Craft 2 I've used createFromString() as following: DateTime::createFromString($pubDate, craft()->timezone) But if I use this function in craft cms 3 then I'm getting the following error: Call ...
0
votes
0answers
31 views

How to automatically set time in a date/time field?

For a specific kind of entry I need the time in a date/time field to either automatically display as 23:00/11pm on the user dashboard, or, permanently set the time on that date/time field to 23:00/...
2
votes
2answers
61 views

Craft 3 FeedMe - Help accessing deeper XML nodes

I'm importing data from an XML file. I'm having trouble accessing some of the deeper nodes in the xml file. Example of my xml here (chapter being the repeating item): <article xmlns="http://...
2
votes
1answer
25 views

Unavailable plugin during migration to craft 3

During a migration from craft 2 to craft 3, I stumble in 3 issues with plugins. Plugins are not available in craft 3. For example,"instablog" plugin Reinstall paid license plugins. Custom plugins. ...
1
vote
1answer
55 views

Work with data/content from entries

I'm usually working on Backends with PHP and ZF/Laminas. Now I'm building a headless (only Backend) Craft CMS website and have a couple of questions that I didn't find a clear answer on. The Craft ...
0
votes
0answers
19 views

Is it possible to get a users most popular categories based on Craft products?

So i wanna show the user the product categories that is most popular for that spesific user. Is that possible?
1
vote
1answer
81 views

Disable activation link email for a specific user group

I am developing a website which is having two user groups. The users of first user group will have self activation email with account activation link while second user group will be activated by admin ...
0
votes
0answers
56 views

Date Field Validation by PHP plugin

I have a form for updating user info, with a field of birth date. However, I am struggling to develop a validation for this date field by PHP. Its frontend code is this; {% set tz = craft.app....
0
votes
1answer
24 views

Is this level of server CPU usage normal? Solspace Calendar 3

Digital Ocean graphs are below to see what I am referring to but it seems like this plugin is using an inordinate amount of power for what it is doing. As far as I can tell it is directly related to ...

1
2 3 4 5
31