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
19 views

Read File from Main Plugin Page

I'm new to plugin creation for Craft 3 and currently stuck trying to read the contents of a JSON file. I can manage it fine from the Settings page using: protected function settingsHtml(): string ...
2
votes
1answer
14 views

Global Site Variables (Static Page?)

On various Craft sites, I've needed to provide my clients with access to certain variables used across the site. Things like open hours, specific seasonal color palettes, on / off operation toggles. ...
1
vote
1answer
33 views

Additional criteria to filter status of field passed into RelatedTo

I'm trying to save all the images related to an entry in a variable. I need the images that are added through a matrix field in the entry. I'm using the following code, but am then also getting images ...
0
votes
0answers
18 views

Craft Commerce 3 Custom Adjuster

I created a new plugin to register an order adjustment to remove tax for Tax Exempt customers, but I'm having troubles getting the adjustment to actually take place. I have a main plugin file as ...
1
vote
1answer
14 views

What does {{ hiddenInput('enabled', '1') }} in an entry form do?

What's the purpose of {{ hiddenInput('enabled', '1') }} in an entry form? <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} {{ actionInput('entries/save-entry') }} {{ redirectInput('...
0
votes
0answers
11 views

Craft 3 showing blank screen in devMode on exceptions

There are two things I'm trying to sort out – this is all on a local setup with devMode on: When I do a throw HttpException(...) from one of my module's controller actions, the response is not ...
0
votes
0answers
9 views

Error uploading the file

Error uploading the file: The file system path “/home/ecs/public_html/public/uploads/” set for this source does not exist can anyone help?
0
votes
0answers
12 views

Problems with CRAFT_BASE_PATH

I would like to make a Website for a friend and we are having problems with the CRAFT_BASE_PATH in the index.php We want the folder structure on the server, to looks like this: craftfolder is not ...
0
votes
0answers
11 views

frontend-editing with redactor?

Has anyone an idea if it is possible to get the frontend editing for redactor text fields working like in their native redactor demos with click-to-edit and air toolbar, for instance https://imperavi....
1
vote
1answer
39 views

Forcing creation of all transformations for all assets

Regarding a similar question I only found the advice to delete a table in the database but because I don't like fiddling with the db very much I like to ask: Are there ways to force craft to generate ...
0
votes
0answers
20 views

Best way to sync the Live and Dev install/server?

We have a live craft website and are looking into ways to keep a copy of this live site on a subdomain on the same server for development purposes. The ideal way would be to have an identical copy ...
0
votes
0answers
11 views

At what point is siteId set for orders?

I have an adjuster I am trying to get to work, but the order has to come from a specific site in order for the adjuster to be applied. The siteId is 2, but when I try to get the siteId from the Order ...
1
vote
0answers
10 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/...
0
votes
0answers
10 views

Ajax loading for filter based on categories in Craft 3

I have a page with blog listed with pagination using craft paginate. {% paginate craft.entries.section(['blog']).orderBy('postDate desc').limit(15) as pageInfo, entryTemplates %} Now I am need of ...
0
votes
0answers
16 views

Settings Email - GMail setting test

We are trying to add email settings through the Craft control panel panel. We are trying our company account which is a Gmail address (hosted via GSuite). While testing the email service or trying to ...
0
votes
0answers
16 views

Error using the Contact Form plugin

I have been trying to build a simple form that sends an email when submitted. I was recommended to use the Contact Form plugin. I have already set it up, and am trying to submit the form, when I get ...
1
vote
1answer
18 views

Discount for subscription plans?

In the CP there are discounts that are applied to products in cart. Is there an option in the CP to apply discounts to subscription plans or would this need to be done by creating a module? Just need ...
1
vote
1answer
26 views

Disabling caches in Safari results in server errors while developing Craft 3 site

I'm running into a vexing issue while developing a personal site in Craft. I have a new Craft 3 site, installed manually. I'm developing live on the server in a dev subdomain. My .env sets the site to ...
1
vote
1answer
24 views

Project Config On or Off for Production Server

Should Project Config ('useProjectConfigFile' => true,) be set to 'true' or 'false' on the Production server? I have been reading Craft CMS documentation, watching some CraftQuest Lessons, searching ...
0
votes
1answer
15 views

How do I upgrade the MYSQL database from Craft 2 to Craft 3 on GoDaddy

How do I upgrade my MySQL DB for a Craft 2 site to Craft 3. I don't have access to the SSH server or use of Composer, so I have to move files via FTP and do everything manually. My client is on ...
1
vote
2answers
22 views

Importing voucher codes from Espresso Store to Verbb Gift Vouchers

I'm doing some messing with MySQL to import some Espresso Store voucher codes into a Craft Commerce site as Verbb Gift Vouchers. I've got a long query that basically reads the data from the EE table(...
0
votes
0answers
21 views

Inconsistency in Channel Section Type of Craft3

I'm trying to mess around the Entry URI Format and the Template trying to understand how it work. Using the News settings below, when I access the http://site.dev/news/save-our-seas, it's working fine ...
1
vote
1answer
19 views

What does update actually do?

Upon updating CraftCMS via CP > Utilities or Terminal, does this update only the vendor folder? Or does it also change structure in the DB and other files outside the vendor?
0
votes
0answers
12 views

Paypal Express, Commerce 3.0, more information on Paypal Invoice

Using Craft 3.4.9 and Commerce Pro 3.0.11 What's the best way to get more information onto a Paypal invoice so that I can match Paypal data with a Craft Commerce order? Does anyone have some success ...
1
vote
1answer
24 views

Where is this spam message sent using the Contact Form plugin?

I've noticed all of my Contact Form spam has a referrer that matches the form's location. Building a module is out of my comfort zone for now (not really a developer). I am currently using the ...
1
vote
1answer
17 views

How to reference a folder inside of a volume, Craft 3

How do I reference a specific folder (by name) inside of a specific volume. I cannot use the folder ID, I must use the folder name because the name of the folder is a variable related to specific ...
0
votes
0answers
14 views

static site pipeline sync plugin does not produce artifacts

I'm trying to generate static sites from my Craft CMS. I've found the static-site-pipeline-sync plugin which seems to do exactly what I need. However, it does not generate artifacts despite the fact ...
1
vote
1answer
29 views

Change base URL for email activation link?

I am using Craft as a headless CMS and have set base Url/siteUrl to the url of my React/Gatsby site. I needed to do this as my navigation plugin, Navie, appends it by default. But now when users ...
0
votes
1answer
11 views

Is it possible to validate whether all assets in an entry have been uploaded?

Is it possible that all assets are uploaded in a single entry and display success or fail in a friendly way? Use case: Client uploads 2000 photos at a time in an entry and has to keep scrolling to ...
1
vote
1answer
31 views

Use Craft globals for CSS styles

Is it possible to pass a value from Craft global setting into a CSS/SCSS file? So for example I want to be able to allow the end user to customise colours and fonts without having to include it inline....
1
vote
1answer
28 views

alternative global variable to siteUrl or the primary website?

I am currently developing a multilingual craft website. To include assets like styles and scripts, I have so far built the URL following the pattern "{{ siteUrl }}/assets/css/main.css". However, as ...
0
votes
0answers
10 views

Freeform custom field import / export options

Does anyone know of any import / export options for fields built in Freeform? Ideally I would be able to build a bunch of custom fields and then export a JSON file, or some other file type (XMl) that ...
1
vote
1answer
92 views

Headless Live Preview with Gatsby

I am following Andrew Welch's post here - https://twitter.com/nystudio107/status/1168220713158942720?lang=en I used the gatsby-config.js file he shared here - https://gist.github.com/monachilada/...
1
vote
1answer
18 views

Craft 3 Cache Busting for Pending Entries

So in Craft 2 the following code was required to cache bust if an entry was set to pending or post at a future date. {% set firstPending = craft.entries({ section: 'projects', status: 'pending', ...
0
votes
0answers
13 views

Browsers “connection to the server was reset” every time i try to access “options” in admin in clean installation

Every time I try to access "Options" section of the admin, the browser shows a blank page and "connection to the server was reset". This error shows in firefox, and in Chrome shows "localhost no ...
0
votes
0answers
22 views

Yii2 2.0.31 in Homestead errors

I am getting the following error when trying to update Craft from 3.3.18.4 to 3.3.19 and any version after. It seems like Homestead or Vagrant is having some sort of issue with IpValidator or the ...
1
vote
1answer
26 views

Adding 301 permanent redirections in Craft CMS

I am not able to redirect any dead page. Although I have added the redirection but it is not getting reflected. Please help.
1
vote
2answers
34 views

Posting to plugin's action controller using Ajax + JSON

I want to use Ajax to POST to a plugin endpoint and get a JSON response. The plugin I'm using is for Mailchimp newsletter subscriptions and should allow for JSON responses: https://github.com/aelvan/...
0
votes
0answers
17 views

Outputting the order of an entry and the total of related entries

I have an item that has related entries to it. I want to output the position that item is within the related entries and the total of related entries also. e.g. 2 of 7 I've figured out how to get the ...
1
vote
1answer
34 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://...
1
vote
1answer
25 views

Avoid saving $_POST in Craft logs for certain URLs

We know that Craft logs the $_POST variable in web.log. I wonder if we have some sensitive data going through the server side (collected from a front end form), even if we don't save it in the ...
0
votes
0answers
15 views

$PATH variable location for backups

Folks: This is surely something real basic. I have not been able to create a database backup manually or when updating. Mysqldump is installed. I know the location of mysqldump (/usr/local/bin/...
1
vote
1answer
44 views

How does Craft CMS cache with Redis?

I don't understand how Craft CMS processes cache with Redis especially when saving to database/s? My environment: Craft Pro 3.4.8 PostgreSQL 12.2 PHP-FPM 7.4.3 Redis 5.0.7 I followed examples from ...
1
vote
0answers
27 views

Check if entry type has field

I can't seem to figure out a good way to see if an Entry has an actual field defined. All the examples I see just to a falsy check for the property name, but this might fail if you have previously ...
1
vote
1answer
36 views

How to return custom fields in GraphQL

This is definitely a noob question, but I can't seem to find an answer to this. (Completely new to GraphQL). I'm trying to simply return entries: query test { entries(section: "vacancies", limit: ...
0
votes
0answers
8 views

Log setProgress in external class

I'm running an import of some articles. But when I'm executing the job, I'd like to set the progress and show some explanation in the label. But as I like to keep my code as clean as possible, I have ...
0
votes
0answers
14 views

postLoginRedirect paths for multi-site scenario

When using settings like postLoginRedirect or loginPath in a multi-site scenario, is there a way to way to define different paths for each site? Or would the path defined be used for both sites, just ...
2
votes
2answers
20 views

Is it possible to allow logging at LEVEL_INFO without logging all the SQL queries?

We're currently logging our site at LEVEL_INFO to have a good idea of what's happening on the site. We find it useful, and appropriate, to log informational messages at that level rather than at ERROR ...
2
votes
1answer
22 views

BaseURL field not available

First time I install CraftCMS and during the wizard as well as in the Control Panel the fields for BaseURL are displayed like this: I got passed the wizard by using the comand line tool but now can't ...
0
votes
0answers
21 views

Update category selection in user custom fields

I have a Category "Colors". This category has: Blue, Red, Green I've added a custom users field (CP > Settings > Users > Fields), this field is the category type. "Colors". In the front of website I ...

1
2 3 4 5
29