All Questions

2
votes
1answer
26 views

Unable to Access “Settings” in Backend

So I've created a boilerplate for my web development company using Craft. However, I'm encountering so much inconsistency across different machines. I recently set up a new website at my public ...
2
votes
1answer
22 views

Use alias for site url based on root url defined as env var?

I was wondering if the following setup is a good practice. In my .env file I defined a single rootUrl var which contains the site root url like this: ROOT_URL="https://www.mydomain.test" In the ...
1
vote
0answers
30 views

Custom plugin: Creating new fields will delete the field group they're being created in

I have a simple plugin which reads in a CSV file, and based on the first row of data will create a new field group, and then create fields within that group. The first time I run it everything goes ...
0
votes
0answers
17 views

Contact form plugin - cannot add attachment

I use contact form plugin, on craft installed on local xampp server. I created simple module that would add attachment to every message sent by contact form using beforeSend event. Event::on(Mailer::...
1
vote
2answers
25 views

Help setting up Memcached in Craft 3

We want to use Memcached but are struggling to find Craft 3 specific config examples and documentation. The docs mention several things that seem to lead to dead-ends: App config docs here show ...
1
vote
1answer
14 views

FreeForm and HubSpot - Current Page

We are looking to place a contact form across all pages and want to integrate HubSpot. I noticed that there was the ability to match up the fields with HubSpot - which is great - my question is how do ...
1
vote
1answer
24 views

Imager plugin for watermarks

First time using the Imager plugin and really unsure how to code it. Looking over the documentation I'm not clear on what the 'logo' is referring to to know what to change it to: { watermark: { image:...
1
vote
1answer
17 views

Output raw html from if statement and combining strings?

I have the following code: <img{{ block.imageWidth|length ? ' width="' ~ block.imageWidth ~ 'px"' }} /> If imageWidth is specified as 120, it should output: <img width="120px" /> ...
1
vote
1answer
37 views

Why is the Algolia index population process with Search Plus timing out?

I'm at a loss here. Hopefully, someone here can shed some light into a Search Plus plugin and Algolia index population issue I'm having. I'm able to add an item (page, blog post, product) to the ...
1
vote
1answer
33 views

Modules - CP Template not found

I've used this tool to generate a module: https://pluginfactory.io/ So in my constructor, I have Event::on(View::class, View::EVENT_REGISTER_CP_TEMPLATE_ROOTS, function (RegisterTemplateRootsEvent $...
1
vote
1answer
26 views

How to load entries data in the General Configuration file?

I'm trying to set dynamic paths for values such as activateAccountSuccessPath. This kind of code below from my routes.php file works very well: use craft\elements\Entry; $myAccount = Entry::find()-&...
1
vote
2answers
68 views

How to use Craft CMS?

I've manage to install Craft CMS with command line, I've the message "installed craft successfully" so I guess it worked, plus my database has been completely populated. But then, how do we access the ...
1
vote
1answer
38 views

Where can I find the robots.txt file in Craft 3?

I can't find it in the web folder or anywhere else, but its there when I visit the file in the browser.
1
vote
1answer
14 views

Entries Field Type showing all entries instead of entries selected

I am new to craft and twig and need some help showing only added entries to matrix block. What I have now is showing all entries from the section. I may be going about this all wrong, I don't know. I ...
1
vote
1answer
16 views

Possible to reflect changes to a plugin's composer.json without uninstall/reinstall?

When working on a plugin recently, I decided to add a CP section: composer.json { ... "extra": ... "hasCpSection": true ... } The only way that I was able to have this ...
1
vote
1answer
17 views

My plugin settings page is never loaded

I have been staring at this all morning, comparing to other plugins online and cannot see why my plugin settings page never registers. I have verified the actual settings model is populated, but ...
1
vote
1answer
44 views

Template for Site Group rather than site handle

We are building a multi-site set up in Craft. We will have a lot of "microsites" for different locations. I have a site group called "Microsites" and I would like the home page for each of these ...
1
vote
1answer
23 views

Looping Related Entries with a Super Table

I need to loop related entries. I am using a SuperTable field with the handle "related" with an entry field with the handle "contentEntry" and two text fields for alternative text and descriptions. ...
1
vote
1answer
15 views

Is there a way to auto-create a sections Site Settings and propagate when a new site is created?

My customer will have lots of sections and lots of entries in each, for each site. Over time they will add new language sites. When a new site is added, there are no sections or entries for it. So ...
1
vote
1answer
14 views

Display all fields without knowing object type?

I was looking for a way to show all fields/properties of a given object, and came across this useful tidbit: How to display all fields belonging to current entry? I'm new to Craft/Twig and didn't ...
1
vote
1answer
16 views

How to display the featured image on a Commerce product:

How do I display the featured image on a Commerce product: <figure> <a href="{{ entry.url }}"> <img src="{{ entry.featuredImage[0].getUrl('medium') }}" alt=""> <...
0
votes
0answers
22 views

Assets uploaded image quality is terrible

When I upload a JPG image through Assets, the image quality is terrible. I dont mean a slight difference for web optimisation, but I mean REALLY bad! See screenshot. Can't find any helpful about ...
1
vote
1answer
28 views

Craft 3: fetching a single Matrix row by its dropdown field value

I have 2 Matrix fields in an entry type, both of which use Dropdown fields: Matrix: urls address (block type) context (dropdown field values include 'own') address urn ...
1
vote
1answer
9 views

How to save entry to the current site from the front end?

I have a multi site setup and a front facing entry form, which saves entries always to the same site (and not the current one which is weird). Is there a way to define to which site the current ...
1
vote
1answer
14 views

Unexpected token “name” of value “name” (“end of statement block” expected)

Internal Server Error Unexpected token "name" of value "name" ("end of statement block" expected). Getting this error on my commerce/products template. What am I missing? {% extends 'shop/_layouts/...
1
vote
0answers
14 views

Asset field - saving assets with dynamic subfolder by categories not working consistently

I have two asset (image) fields in project entry type, both with the same setting and with different outputs… Anyone knows why? Thanks My fields are: intro image field gallery image field Both ...
0
votes
0answers
14 views

How could a non-translateable field be translated for just one page?

We will have many language sites for our client, most of them will be in English, and so do not need to be translated. Then a few will be (German, French, Spanish). The English sites can be the same ...
1
vote
0answers
14 views

Exclude User Group from Sale

Is there a way to exclude a User Group from a sale? We have a trade user account that applies a flat 20% discount across all products but we're trying to run a different sale for all customers on a ...
1
vote
1answer
18 views

Element API: Is it possible to ignore/skip an Entry?

I would like to exclude some of my entries, via my own validation inside the Transformer, from the api output. Is there a possibility to move on to the next Entry without outputing anything? Right ...
1
vote
1answer
33 views

How do I import database using the CMS Craft 3

We have previously used the Schematic plugin for database import inside a Docker container for a Python script. This is the command used for the importing, $/data/craft/craft schematic/export --file=...
1
vote
1answer
21 views

How can I store Craft sessions in the database?

Is it possible to configure Craft 3 to store session data in the database? On some other CMS's this can be enabled. The reason I'm exploring this is because we're having an issue whereby PHP sessions ...
1
vote
1answer
28 views

Craft commerce and invoices

In general what is the best practice to handle invoices from orders made in Craft Commerce ?
1
vote
1answer
23 views

Error: File to import not found or unreadable: ../../../../../lib/craftcms-sass/mixins

I have two Craft websites running locally and they both have broken css on the backend due to the error below. Every time I update it is temporarily fixed but after a few clicks or refreshes it's back ...
1
vote
1answer
43 views

Localhost can't connect to plugin store or updates (WAMP Server)

I've now tried installing Craft on multiple PCs to run a local dev environment, but keep getting the same problem. It installs fine, the System Report shows all green, but when I first load the ...
1
vote
1answer
39 views

Restrict a users permission to only edit 'translatable' fields on a specific site?

We would like to have a 'translators' user group, where the members can edit only the 'translatable' fields, but not the non translatable things (images, categories etc). May be i missed something, ...
0
votes
0answers
38 views

Auto trigger craft project-config/sync on deployment

So I have the following in my Composer file: "scripts": { "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-...
1
vote
1answer
133 views

upgrade issue Yii Framework from version 2.0.15.1 to 2.0.16.1

I tried installing a site I developed on my work mac (high sierra), pushed to its repo, pulled it down at home on my mac (mojave)and on running composer update get this displayed in my terminal: ...
1
vote
1answer
23 views

Redis cache memory usage

I’m runnung a few Craft sites with Redis cache enabled. It works fine. Except that Craft only uses around 3mb of Redis memory, with peaks up to 5, while there’s 128mb available. Is there a way to ...
1
vote
1answer
44 views

Dynamically update line item in Commerce 2

I'm currently trying to adjust the line items in a particular cart/order after an event is triggered. I've got: use craft\commerce\Plugin as CommercePlugin; $this->requirePostRequest(); $request ...
0
votes
0answers
12 views

Multi site live preview not working on index page

I'm on Craft 3.1.17.2 My multisite setup is using different domains. If I'm on a.com, I can Live Preview everything on b.com fine, except the homepage. I get the error Access to XMLHttpRequest at '...
1
vote
1answer
27 views

Images not showing after Craft 2 to 3 migration

Hi upon migrating my site from Craft 2 to 3 I'm getting errors like this: Twig Runtime Error – Twig_Error_Runtime Variable "largeImage" does not exist. "largeImage" refers to an image transform, ...
3
votes
1answer
20 views

How to query entries written in a specific locale? (Craft 3)

In Craft 2 you used to be able to do something like {% set entries = craft.entries.section('something').locale('de') %} but .locale() has been removed and there's nothing similar in the docs that I ...
0
votes
0answers
16 views

Editing Images in Craft Cause Server to Hang

In the assets area when wanting to edit an image (focus point etc), the server hangs after double clicking an asset. If you checkmark an asset and then select Edit Image, set the focal point and ...
0
votes
0answers
16 views

Redactor - can't link to files

I have added the "file" option in my Standard.json file for Redactor. Wehn using the Redactor field then I can click on the file button and select the image ok. When I view source the file is linked ...
1
vote
1answer
16 views

Craft Licensing and Multiple Environments on Different Domains

It isn't currently clear how licences work with dev, staging and live environments or to be clearer how it works with different domains. I have the following domains setup for different environments. ...
1
vote
1answer
27 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.
1
vote
1answer
21 views

Relations and Categories

What's given: Channel: Nutrition Entries Fieldtype: restaurant Category Fieldtype : menu Category: Menu Channel: Menus that also use relations using restaurant field. Each item in the nutrition ...
1
vote
3answers
31 views

404 – Not Found from _entry.twig templates in subdirectories

Following the Minjingo CraftQuest tutorial, I am getting an error on the front end when I access any routes other than the root/home page. In my template folder, I have a structure that looks like: ...
1
vote
1answer
19 views

Solspace Calendar Event Editing

I'm using Solspace Calendar for Craft and I'm currently trying to implement the edit event form. Once a user selects an event on the calendar they are taken to the event page. On this page I have the ...
1
vote
1answer
15 views

Saving an entry with multiple parentheses throw a 403

Saving an entry with multiple parentheses (in a redactor field) throw a 403. I know it's from ModSecurity - but never experienced that behaviors with another CMS (WP, Kirby, etc.) or with Craft2. This ...

15 30 50 per page