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

Prevent stock notification email if certain conditions

We have a client who wants to be able to create a manual order in Craft Commerce when a product/variant is out of stock. Currently to do a manual order they have to add 1 stock to Commerce then do the ...
0 votes
0 answers
9 views

Plugin 'editableTable' settings field returns incorrect type when empty

My plugin uses a {{ forms.editableTable({...}) }} field within the settings.twig. When the field has row items it will save just fine, but when the table is empty it attempts to save it as an empty ...
0 votes
0 answers
2 views

Getting revisions from GraphQL explorer

I am on my GraphQL explorer trying to retrieve all the revisions from a specific entry, I am able to get the entry but not the revisions flag that appears in the the documentation (https://craftcms....
0 votes
1 answer
51 views

Composer was unable to install the updates. Error: Unknown package has no name defined

Hi I cannot install Craft CMS updates. I have version 3.1.18 and I'm trying to update to 3.7.50 I have updated Composer successfully. I did however have a platform PHP 7 issue listed in composer.json ...
0 votes
0 answers
15 views

Filter submission based on a date period

How do i list submissions based on a date period, e.g. list all submissions that are less than a month old, or less than 6 months old. Docs dont appear to suggest how to do this, and i have tried ...
0 votes
1 answer
23 views

P&T Contact Form Plugin - How to Retrieve the inserted values?

I have been looking for how to retrieve the inserted values when the submission is failed. Other than prepared fields (Name, Email, etc.), the inserted values disappear from the fields. I already ...
0 votes
1 answer
13 views

Search query ignoring custom fields in search in search index

I have a site with around 300 entries and at least 50 custom fields. But I'm only getting results if the keyword(s) are part of the title field, I have the "Use this field's value as keywords&...
1 vote
1 answer
925 views

Craft 3: admin is showing "500 Internal Server Error" (apache) after fresh install

Just successfully installed a fresh copy of Craft CMS via web browser method under: http://kultursprung.org Frontend is visible but the admin is showing raw Apache error 500 after fresh install: http:...
0 votes
1 answer
28 views

Wheelform ~ Email Notification with file upload attachment, but **not** store the file upload in assets?

I have a craft v3 site using Wheelform plugin to power a custom 'job application' form. The 'job application' form has a 'CV' upload file field. The submissions from the form are sent as email user ...
0 votes
1 answer
20 views

Way to translate days in CraftCMS 'Opening Hours'

Maybe I'm overlooking something here, but I can't find a way to translate the week day names. This is my template code: {% set storeHours = storeHoursGlob.storeHours.getRange(1) %} <div class=&...
0 votes
1 answer
10 views

How to regenerate missing folders

TLDR: How do I re download / re generate the base Craft CMS folders / files if they are missing from a project? I know you can clone the base Craft CMS project from github (this might be the answer?) ...
0 votes
1 answer
13 views

Admin user can't login

I need help getting an admin user logged in. The password was reset and doesn't work. After resetting the admin user password using forgot password, I get prompted with Invalid username or password. I ...
3 votes
2 answers
441 views

Mailer config in Craft 3 not getting merged

I have this custom config in config/app.php, but Craft seems to keep using the default Control panel Sendmail config. It seems this doesn't get merged in the main.php file. (as promised) return [ '...
1 vote
1 answer
339 views

Craft 3: Searching within back-end & front-end isn't giving all entries/results

Searching within Control Panel as well as the front-end is not going through all entries. When I try searching in the Content tab I see the pages are listed but when I try to search for the entry it ...
0 votes
1 answer
10 views

Is possible to select a site in a multisite installation to show his url, sitename, and more properties? (Craft 3)

I'm working on a multisite installation on Craft, and i want to know if it's possible to select a specific site to show for example a link to it, sitename and other attributes. I couldn't find a way, ...
1 vote
1 answer
34 views

Uncaught TypeError Dotenv Create on updating to Craft CMS 4

Just updated to Craft 4, migrated my /web folder over as well as my /assets folder and trying to load the index page gives me the following error. Any help would be great as I can no longer access my /...
1 vote
1 answer
117 views

Updating private repo plugins from admin?

Is it possible to update private repo plugins from the admin at all? Would love that functionality, especially for smaller projects that are installed where there's no CLI access.
0 votes
1 answer
20 views

Can't access Cookie from controller in plugin

In the frontend my website sets a cookie wich i need during a controller action. When calling the controller action from my plugin this Cookie gets duplicated and the value is replaced with an ...
0 votes
1 answer
15 views

Order entries query of a structure by lightswitch field

I have a bunch of entries in a structure and I want to have all the "featured" entries returned first. Then everything else returned in the order set for that structure in the admin. The ...
1 vote
1 answer
248 views

Hook into Entry::EVENT_AFTER_SAVE when user saves it

I want to send a Mail to an admin, whenever a User of group ‚Cook‘ creates an Entry of Type ‚Recipe‘. For that I created an Event reacting on Entry::EVENT_AFTER_SAVE : Event::on( Entry::class, ...
4 votes
2 answers
566 views

Craft 3 Custom Plugin: model validation

Struggling a bit here - have created a custom plugin where I want to validate form submission against a predefined model before saving to the database. All pretty straightforward so far … However, if ...
0 votes
1 answer
27 views

DB Falling Over

Currently helping out on a family run craft commerce site after agency was not very helpful. We are having issues with downtime and I can see a LOT of errors in phperrors.log This is an example of a ...
2 votes
2 answers
209 views

Ensure @web alias is explicitly overridden

I just stumbled upon this advice in my Craft3-system report: "Ensure @web alias is explicitly overridden" In which file do I need to put the override? "config/general.php" doesn't ...
0 votes
1 answer
25 views

Where can I find documentation on built-in flash message for `users/save-user`?

I'm trying to customize my user profile twig template UX to be a little more user friendly, but I can't figure out where to find what the built-in default errors/notices flash messages for the users/...
0 votes
1 answer
24 views

500 Internal erroron admin - session related

I am working on trying to get a local copy of a site working, but ran into an issue where the front end is working, but the admin page is not responding when I try to login. This site is Craft 3.7.44 ...
0 votes
1 answer
41 views

trying to insert super table field values using graphql in craft cms

cant able to store values from super table field,need a correct format to do Graphql mutation saveEntry($superTable: [demoSuperTable_SuperTableBlockContainerInput] = {demoSuperTable_0: {id: "&...
1 vote
1 answer
54 views

MySQL 5.7.8 or higher is required to run Craft CMS Error

I'm extremely new to Craft CMS and having to ensure it can be ran from a Azure Virtual Machine. I have added, Apache, PHP and MySQL and the website does run on the server. However the issue occurs ...
0 votes
0 answers
22 views

Recommended Redis data eviction policy for Craft CMS

I have recently switched from memcached to Redis. The cache, session, template caching and mutex is now using Redis on a project. While Redis generally gets managed by Yii/Craft CMS, Redis features a ...
1 vote
1 answer
140 views

Craft Setup 3.6.5.1 with MYSQL with SSL version 5.7.29

I'm trying to install Craft version 3.6.5.1 with MYSQL version 5.7.29 from Azure. While setup it fails with the following error Testing database credentials ... failed: SQLSTATE[HY000] [9002] SSL ...
1 vote
1 answer
102 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 -&...
0 votes
0 answers
23 views

GraphQL query orderBy number including null

I am attempting to query entries via that have a field (ex numberField) with field type Number. Some of the entries don't have a value for this field, so in the response it has null. I am wanting to ...
1 vote
1 answer
42 views

Get entries in an entry type in twig template

I have two channel types section namely "Services" and "Cases". I have added caseServices as entry field in cases. I can get services of a case in twig as entry.caseServices. But ...
1 vote
1 answer
31 views

Website transfer places /web in all urls, cs and js not loaded when moved up directory

I just transfered my website from one server to one.com. Now nothing works anymore cuz apparently one.com wants the index.php in the root directory but my index.php is in the "web" directory....
1 vote
1 answer
203 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( ...
2 votes
1 answer
35 views

How can i disable channel list url?

I have a channel type entry where I'm inserting services. I have created a channel and add route services/{slug} and added template services\_entry.twig. I want to keep url for single service as ...
0 votes
0 answers
23 views

Craft cms environment Variable not parse

I am using craft cms version 3.7.42. when i use my system email that give me my .env variable name only not parse value. https://prnt.sc/Xx9GorSz86JA {{ craft.app.projectConfig.get('email').fromName }}...
1 vote
1 answer
53 views

MySQL server has gone away / max_allowed_packet

After adding a second block type to an existing matrix field, we started receiving a "General error: 2006 MySQL server has gone away" error when additional content was saved to the new block ...
2 votes
1 answer
27 views

Problem running a sale on the site

Craft shows the sale running, and can tell which products are on sale using a: {% set saleProducts = craft.products() .hasVariant({ hasSales: true, hasStock: true }).all() %} loop, but on ...
1 vote
2 answers
160 views

Using MySQL With just InnoDB storage engine

What are the implications if I create all the Craft database tables on the InnoDB storage engine? Will there be any performance problem?
0 votes
0 answers
15 views

Get previous site siteGroup

Is there a way to get the siteGroup of the previous url? I have a multiSite/multilanguage project. I want to be able to check the previous Url siteGroup and compare it with the current siteGroup
0 votes
0 answers
15 views

Editing entry without creating a new revision in particular scenario. is this possible?

I'm updating particular field in "A" section whenever a new entry is created in "B" section. In this scenario I don't want revision to be created for "A" section. Is this ...
1 vote
1 answer
27 views

Is re-running the ConvertEntryRevisions queue job safe to run after migration to Craft CMS 3.7?

I have a fairly large Craft CMS 2 site was recently migrated to Craft CMS 3, because of the large amount of entry revisions, the migration that runs the ConvertEntryRevisions queue job did not ...
2 votes
2 answers
70 views

Recommended caches to clear after server deployments?

Craft has this article about deployment best practices: https://craftcms.com/knowledge-base/deployment-best-practices It also states that you might want to clear caches after deployments, which is of ...
1 vote
1 answer
29 views

Best way to find current/pending jobs without knowing their ID in the queue

In Craft 2, you used to be able to do something like this to find pending tasks: craft()->tasks->getPendingTasks('MyPlugin_CustomTask') In Craft 3 we of course now have the Queue, however there ...
1 vote
2 answers
325 views

Deleting Duplicate Fields Brings down Craft Website and Server

I have somehow managed to duplicate some fields in my Craft install (see image of unused fields). When I delete the unused duplicates I create a server error and can't access Craft. To rectify I had ...
1 vote
1 answer
32 views

Plugin install/remove causes fatal error on local

After updating to Craft Pro 3.7.44 my local MAMP site now throws a server error when adding/removing a plugin within the Craft CMS UI. Editing the composer.json file manually and running composer ...
1 vote
2 answers
184 views

Import large number of entries every day - 1 million

I have a shopping product feed that is generated every day with around a million products. This can be in any format needed - CSV, JSON, XML etc, and will live on an S3 bucket. Each day, I need to ...
0 votes
0 answers
31 views

Lozad doesn't swap images on staging site

I inherited some lozad.js lazy loading code that broke when I pushed to the staging server. Code swaps out the thumbnail image for the high quality version. The ones in the view on load aren't getting ...
1 vote
1 answer
114 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
2 answers
153 views

Generating srcset in a similar way to WordPress

I come from a WordPress background, so I'm attempting to create responsive images the way I'm accustomed to with WordPress. Perhaps that's the wrong approach, I'm not sure. In WordPress I would ...

1
2 3 4 5
37