239
questions
-1
votes
1
answer
23
views
'npm run dev' result: [Error: ENOENT: no such file or directory, open '/ddev/project-name/node_modules/@vue/apollo-composable/src/useApolloClient.ts']
I took over a Craft CMS project, which I successfully upgraded to the latest version of Craft 5.
When I run the command needed to build the JS and CSS files
npm run dev
I get the following error:
...
0
votes
0
answers
27
views
How to register an Asset Bundle in Craft CMS 3.x to style a Twig template?
I'm trying to create and register an Asset Bundle in Craft CMS 3.x to include a custom CSS file for styling a Twig template. I've followed the official documentation provided by Craft CMS: Asset ...
0
votes
0
answers
22
views
Is there a efficient way to cache the data after fetching from the graphl ql in craft cms?
Hi I want help on this scenario , so I have a template that will fetch the data from the graphql and I am using sprig to render a template for that data but the issue here is whenever I reload or go ...
0
votes
0
answers
78
views
OpenSSL unable to sign data In Firebase JWT sign in PHP
We are trying to send push notifications in PHP, but we are getting this error:
[queue.ERROR] [FBM_ERROR] OpenSSL unable to sign data {"trace":["#0 /var/www/html/sites/mysite.com/...
0
votes
1
answer
109
views
Craft CMS v4 -> v5 upgrade *** failed to apply m230511_215903_content_refactor
I'm trying to upgrade a local Craft CMS site from the latest version of 4 to the most recent version of 5. I've followed the official upgrade guide but i'm having an issue when the migrations are ...
0
votes
0
answers
15
views
Determine Event/Trigger order in Craft CMS
I have an plugin installed in Craft that makes changes to the headers of Craft. I wrote a module to make changes to the headers AFTER the plugin made it's changes. However the event in my plugin is ...
5
votes
1
answer
5k
views
Unsupported Gulp Version. for Gulp 5.0.0
I have created a Craft 4 project and I am installing Gulp on my project. I have installed he latest version of Gulp(Gulp 5) and the moment I run the gulp command, i Get this:
.
I have tried Gulp 4 as ...
0
votes
0
answers
45
views
CRAFT CMS: Create a product type programmatically from a module
I need to create a product type from my module
Ccreate my product after that with the product type created before.
Create the default variant
how can I achieve that?
for example:
// First, let's ...
0
votes
0
answers
68
views
CraftCMS 3: Template not found: dashboard
I am trying to set up and existing CraftCMS 3 installation on a Ubuntu 22.04 machine with PHP8.1. The deprecation errors I can fix, no problem. DB imported, it's accessible, no biggie. All pages load ...
0
votes
1
answer
63
views
CraftCMS upgrade issue from 3 to 4
I'm trying to upgrade CraftCMS 3 to 4 version successfully completed until database migration step,
When i try to run php craft migrate/all command getting the bellow migration error,
columnSuffix ...
0
votes
0
answers
49
views
Craft CMS 3 GetQueryParam Query parameter always coming back as null from user input
Implementing a search bar in craft cms 3 application and query is always returning null from user input. Entries are always fetched correctly, searchTerm as shown in the code is always null. NO errors ...
1
vote
2
answers
331
views
Multiple section query with section wise ordering in Craft CMS
I have multiple 2 sections named 'Events' and 'Latest News' in Craft CMS. I post entries with date in these sections. My problem is I have slick carousel in front end, where I want to display entries ...
-3
votes
1
answer
313
views
I need to add an SSH key to run inside my DDEV Docker container
I have just pulled a repo from BitBucket and attempted to run 'composer install' from inside my docker terminal.
The composer.json file has additional respository dependancies which need to be pulled ...
0
votes
1
answer
208
views
DDEV Share not loading images or CSS on Craft CMS
I am trying to use the Ddev share command to view my local Craft sites on seperate devices using the ddev share command.
The share url is working however my site is only loading the html and not ...
0
votes
1
answer
567
views
ddev not starting correctly
I am new to ddev and am using mac os 13. I used the following tutorial.
https://ddev.com/get-started/
But when I run the ddev start command, ddev doesn't work properly.
Related to this, the docker ...
0
votes
1
answer
108
views
CraftCMS 3 Install from Backup - HTTP 503 - Service Unavailable HTTP Exception
I messed my CraftCMS installation up trying to run an update. I uploaded my local backup files to the server, but now I get a 503 error and I can't figure out how to fix it.
HTTP 503 - Service ...
0
votes
1
answer
413
views
How can I resole a fatal error that appeard after updating Craft CMS?
I want to update to a newer craft CMS version, and I tried to do it in the control panel. The latest available version was 3.7.12. After I clicked on update all I got the following error:
Fatal error: ...
0
votes
1
answer
187
views
Custom plugin method won't be triggered when submitting ajax request
I have created a custom plugin in Craft CMS 4 that has to decode data and store it in it's corresponding entries. However, while developing I fired the method in my init function so on every pageload, ...
0
votes
0
answers
38
views
Craft CMS Utilities misses email option
I'm new to craft and I have to make a school project.
At the moment I'm stuck when it comes down to sending emails.
When a visitor lands on a page it can choose to subscribe to a fictional newsletter. ...
0
votes
1
answer
42
views
Craft CMS WYSIWYG Editor Issues
I am using Craft CMS and just getting used to it. Seems like a great CMS, but I do have a question:
Whenever I add any of the WYSIWYG editors to Craft, all of them have an "Available Volumes"...
1
vote
0
answers
64
views
I want to use query by calling globalset in CraftCMS all child fields should be return
I want to use query by calling globalset in CraftCMS all child fields should be return, because the query that were used in prod are diffrent than queries we use in normal graphql explorer, after some ...
1
vote
0
answers
38
views
How to add a custom language in Craft 4
Context
I am now working on a trilingual website in Craft CMS.
It needs to be available in french, english and inuktikut (a native american language).
Obviously french and english is easy as 123 but ...
-1
votes
1
answer
508
views
Craft CMS 4 multi language best practices
Most multi language sites show the locale in the URL. For example: https://www.stackoverflow.com/en.
With Craft the issue seems to be that the default language seems to also work without the locale in ...
-1
votes
1
answer
853
views
Trouble connecting to the database in a Craft CMS project with DDEV and TablePlus, how can I fix this?
I'm trying to upgrade from Craft CMS 3 to Craft CMS 4 and am running into some issues.
I am trying to migrate my project in Craft 3 from using MAMP Pro to ddev and had some success in the start. I ...
0
votes
1
answer
152
views
Make JS call to custom Craft CMS plugin
I'm trying to build a custom plugin for Craft CMS in which I have a button.
I have managed to create the plugin and a Widget. I can add CSS and JS for the widget.
Now I would like to make a call with ...
0
votes
1
answer
161
views
How to get the route from UrlRule in yii/craft cms
I have route in my routes.php file and I also have routes in my module like so:
return [
'analytics/<tenantSlug:{slug}>/modules/' => ['route' => 'analytics/modules/list', 'name' => '...
0
votes
1
answer
674
views
How to migrate posts from Craft CMS to Wordpress?
I have about 160 posts on a Craft CMS site that I need to migrate to a new Wordpress build. Whats the easiest way to do this? Surprisingly not seeing much info on this.
0
votes
1
answer
511
views
Craft CMS: action input module controller results in 404
I'm making a custom contact form in Craft CMS with a module. The goal is to view all submitted forms in the dashboard and have the possibility to mail after submissions. Submitting the form results in ...
0
votes
1
answer
406
views
Craft CMS: sending email after entry is published
I want to create a site with a channel. On this channel, I want to post activities. Inside the entry, there will be a category selectable with an email address within. Once I publish the entry, craft ...
1
vote
1
answer
336
views
'Request missing required body param' when submitting front end entry form - Craft CMS
I'm pretty new to craft and creating my first front end entry form using the demo code provided by craft. For some reason I'm getting a 'Request missing required body param' error. I've tried adding &...
0
votes
0
answers
99
views
User permissions on subfolders in a Craft multisite environment
I have a craft multisite environment with three sites:
site-one
site-two
site-three
and three usergroups to handle permissions for the sites
users site-one
users site-two
users site-three
users in ...
0
votes
0
answers
150
views
Redactor/HTMLPurifier won't allow entry update CraftCMS
I'm fairly new to all this.... can you guys help me work out what is wrong here?
Most of my site is fine. When I try to edit a Redactor Field however, I get the error
Class '...
0
votes
0
answers
133
views
yii2 equivalent of yii1 model()->findById() construct
I am a Yii newbie, attempting to convert a Yii1-based Craft plugin to Yii2. In the plugin, there are several uses of the following construct:
return MyRecord::model()->findById($id);
What is the ...
0
votes
1
answer
441
views
For Craft CMS, how do I include a category and asset in a GraphQL entry mutation?
I have been stuck on a mutation graphql query in Craft CMS for an entry. This entry I am trying to create includes a category and asset property. I am not sure how to get the category type or asset ...
0
votes
1
answer
392
views
How to create simple plugin in craft CMS4
I am new to this craft cms and plugin creation.
I did research lot to build a really very simple plugin in my local machine and try to install in craft cms 4 but no luck.
I have followed this document ...
2
votes
0
answers
161
views
Craft CMS 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
365
views
Unable to save an Entry because matrix field is invalid - Craft CMS 2
I'm trying to save an Entry but Craft errors because of an invalid matrix field. The Entry includes a matrix field but I haven't changed it. I'm trying to edit another field. When I save the entry ...
0
votes
1
answer
129
views
I have plugin built in craft cms3, I want to use same plugin in craft cms4
I have simply copy and paste plugin( plugin name is websitetoolbox) folder to craft cms4's vendor folder. And modify root composer.json like below.
{
"require": {
"craftcms/cms&...
0
votes
3
answers
3k
views
Error with autoloading. Class does not comply with psr-4 autoloading standard. Skipping
This Error happens when update to composer 2 from composer 1
Class moduleNema\twigExtensions\NemaTwigExtension located in ./modules/moduleNema/twigExtensions/NemaTwigExtensions.php does not comply ...
0
votes
1
answer
213
views
How to submit matrix and category fields in frontend
So i have an entry to submit games.
The games entry has a lot of different fields, and one of the fields is:
a field with fieldType "category" linked to a category
a field with fieldType &...
0
votes
1
answer
171
views
Multiple Load More OOB Button Sprig
I am trying to create multiple dynamic load more oob buttons using Sprig plugin in Craft CMS and they are appearing properly. But the issue comes up when one button is due to be swapped with the ...
-3
votes
1
answer
707
views
How to check if user is logged in and display the user name
I want to check if the user is currently logged in. If the current user is logged in I wanna display hello with a user name. How can I do that!?
0
votes
1
answer
40
views
I am going through project configuration in craftcms
I am going through documentations for project configuration in craftcms not sure what is the different between project-config/write and project-config/modify?
-1
votes
1
answer
100
views
Custom Craft CMS plug-in template changes issue
Somebody has developed a custom plug-in for a project of mine.
I now want to change some templates from this plug-in and no matter what changes I make to these templates, nothing changes! I don’t ...
0
votes
1
answer
386
views
Loop through entries within a category loop but only show once?
In a CraftCMs site I'm trying to loop through a couple categories, then loop through entries within each of those categories, but without duplicating the entry if it is in both categories.
Here's my ...
0
votes
0
answers
641
views
Have to restart docker every ddev stop
I'm just starting out playing with DDEV and hit an annoying roadblock.
It doesn't matter if I'm adding a new project or running ddev start on an existing, the project will only start and be accessible ...
0
votes
1
answer
277
views
CraftCMS custom entry query
I'm trying to create a custom query for a page in CraftCMS but it seems that, if I link an entry to a template, entry query is already loaded as the entry variable.
I know that I can create a twig ...
0
votes
0
answers
372
views
Matrix block is unable to use text method
I am brand new to Craft CMS and just learning the basics. I've been following along with the tutorial included in their docs (https://craftcms.com/docs/getting-started-tutorial/) but when I try to ...
2
votes
2
answers
341
views
How to create a dropdown in Twig using the syntax in the manual?
I'm trying to follow the syntax in the docs: https://github.com/craftcms/contact-form/blob/v2/README.md to output a select. I tried all sorts of syntax but I couldn't get it right… 😅
From the docs, I ...
0
votes
1
answer
203
views
How to implement branding in Craft CMS?
I am looking for ideas for what is the best way to implement branding in a Craft CMS website. I essentially would like to display different logo, images, text, URLs on pages based on the brand ...