Questions tagged [craft2]

Questions specific to the Craft 2 version of Craft CMS; avoid using for questions applicable to all or multiple versions.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Updated S3 library for Craft CMS 2

I've got a site stuck on an older version of Craft, v2. I'd like to switch to using S3 to store all my assets but I've ran into a problem. I cannot authenticate using the S3 api library, this is one ...
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
1answer
65 views

Craft error on NFS filesystem

I have a Craft 2 install that's been working fine until recently when the admin page is giving an error: file_put_contents(): Exclusive locks are not supported for this stream The front end is fine....
1
vote
1answer
22 views

Craft Internal Server Error

I am getting the following error: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #34 of SELECT list is not in ...
0
votes
1answer
22 views

Using action as a key in a query string

I've been tasked with recreating an API within our Craft 2.X installation. For whatever reason, the API specifies the resource it is requesting with the query string parameter action. For example, ...
1
vote
1answer
46 views

How to create an entry with MySQL?

I'm trying to create a new entry from within the database. The section is defined in craft_sections, and the entries for craft_elements, and craft_entries seem correct after the script is run, but no ...
0
votes
0answers
8 views

Category filter with localization?

I'm using craft 2 and have a list of category which are: category A. category B. An entry which have different assigned categories in 2 locales. An example entry belongs on category B in English ...
1
vote
1answer
31 views

Implement hreflang with multi sites

I currently have multi site config. One site have 2 locales. My configuration like so: 'example.com' => array( 'siteUrl' => array( 'us_en' => 'https://www.example.com/', '...
0
votes
0answers
11 views

Migrate SuperTable rows to new entry

I have a single with a SuperTable field with several rows. How can each row be saved into it's own entry, of a new entry type that uses the same field? Initially I tried doing it directly in the ...
1
vote
2answers
109 views

Send email with dedicated SMTP settings from a Craft 2 plugin

I have looked a lot for this but cannot find any dedicated solution. Basically I want to do this: How to send email from Craft 3 custom plugin? … but for a Craft 2 plugin. A how-to for the global ...
0
votes
0answers
30 views

SEO by EtherCreative on Craft 2

I've installed the plugin, but do not understand where I need to change/add the following Fieldtype Usage and Custom SEO Object code. Fieldtype Usage Replace your title tag, and any other SEO related ...
1
vote
1answer
39 views

Just upgraded to Craft 3, environmentVariables changed or stopped working

In my Craft 2 install, I had many links in Twig templates like this: <link rel="stylesheet" href="{{ craft.config.environmentVariables.baseUrl }}assets/css/styles.css"> I recently upgraded to ...
1
vote
2answers
73 views

Craft CMS 2 Task progression

In Craft CMS 2, I've created a task for updating Craft Commerce products from an Excel file. Everything's working correctly except the UI progression bar. The progression bar in control panel stays at ...
0
votes
0answers
29 views

Issue with mcrypt extention in Craft 2.8.0

I upgraded Craft version from 2.6.x to 2.8.0 to make sure it runs properly in PHP 7.2 since mcrypt is no longer available in PHP 7.2+ . But after upgrades, I am getting serious errors when I visit ...
1
vote
1answer
31 views

Craft 2: What would prevent most cached template chunks from showing up in the `templatecaches` table?

I am working on a Craft 2 site that is exhibiting some rather poor performance characteristics. On production, we use memcache for caching, and monitoring on the server shows disappointing cache hit ...
1
vote
1answer
41 views

How to build a web page using different sections created in craft

I am a beginner in Craft. I have a Craft website. There is an HTML design with me. From admin, I divided the HTML into sections and created entries based on that. All the coding related to each ...
1
vote
1answer
29 views

Copy of Craft instance generates “An unknown error occurred” for login

I needed to create a second instance of a craft 2.0 instance and so I copied the current instance to a new instance. I followed the directions found here: https://craftcms.com/guides/duplicating-a-...
1
vote
1answer
45 views

Receiving duplicate Sprout Form submissions

We're seeing duplicate submissions. It's between 2 - 15 of the same submissions, usually 7. They come in irregularly over the next couple minutes after the first one. And only sometimes. They are all ...
0
votes
0answers
11 views

Stalled Task During Locale Activation

When attempting to enable a new locale on an existing Craft 2 site, the task is stalling out at the same point every time. It gets to step 3 which is Resaving entries and then the following PHP error ...
0
votes
0answers
10 views

Craft 2 resave all entries via custom background task keeps failing

I have a craft 2 set with different locales. I deleted one locale and now some of chinese entires seem to be missing the proper url paths. As soon as I open and save the english version the chinese ...
1
vote
1answer
28 views

Steps for integrating an HTML design to a website page and managing its content from backend

I am a beginner to Craft CMS. I have an HTML design for Craft integration. I need to covert this to a live URL page on my website. Also, I need to manage its content from the backend. I think we need ...
0
votes
1answer
21 views

Invalidate cache on new order

I have a list of orders from Commerce 1 (Craft 2) in the frontend. I want to invalidate the cache when a new order is placed but it doesn't work: {% set latestOrder = craft.commerce.orders.first() %}...
1
vote
1answer
76 views

Central Craft CMS management for agencies

We have now more than 60 active website running on Craft CMS and have been able to keep our lives somewhat straightforward when it comes to the development side of things (eg. code repository access, ...
1
vote
1answer
54 views

'If/else' statement inside 'nav' tag

Craft CMS V2. Comment Plugin: verbb comment <ul> {% nav comment in comments %} {% if comment.isFlagged() == false %} <li> {% include '_forms/templates/...
1
vote
1answer
16 views

Hide flagged (inappropriate) comments from comment list

Craft CMS V2. Comment Plugin: verbb comment {% set comments = craft.comments.all({ limit: 10, status: 'approved' }) %} {% for comment in comments %} {{ comment.comment }} {% endfor %} ...
0
votes
0answers
10 views

Craft 2: when searching for an entry can you select an entry by a fields value?

I have an entry in the section microsites these entries all have a required field called accessCode. I have the access code in a variable. I want to load in only that entry. Is this possible without a ...
0
votes
0answers
16 views

Contact form not sending email field

Currently the contact form on our site has Name, Email, Phone and Message fields but the Email a customer enters won't send through to us. Not sure if the below controls this but any help is much ...
0
votes
0answers
27 views

New locale showing content from default/main site (Craft 2)

I have a Craft 2 site I've inherited that is using locales for multiple sites (each with their own domains). When I set things up initially, I got all the locales working without issue. I've been ...
1
vote
1answer
19 views

How can I add fields in the Sprout design your form?

I am using Craft CMS 2.7.3 and sprout forms 2.6.0 version. I have created a dropdown field in the craft cms -> fields. How can I fetch this field or render this field in the Sprout form design? Even ...
0
votes
0answers
21 views

Copy Live to a Test site on same domain?

I have copied my Craft 2.6 live site directory, and created a test directory on our webserver in an effort to create a test site. Also duplicated the db and changed the configure files to point to the ...
1
vote
1answer
31 views

Programatically add lines to a Super Table field

I am trying to add new lines into a SuperTable field of an entry from my plugin. Following the Developper sample, I am able to change set lines to this SuperTable field. But it is replacing the ...
1
vote
1answer
49 views

Looping Entries in Super Table, display row details

I have a Super Tables field, containing related entries: I'd like to display the field name (ie 'English Links') in a template, but can't figure out how, the following outputs a string of values and ...
1
vote
0answers
79 views

Freeform submission only works if 'devMode' => true

I have a locally running form via Solspace's Freeform plugin (Craft2) which perfectly runs on my local setup, but fails silently without any logs or messages on my live-setup. The form is submitting ...
0
votes
0answers
27 views

Undefined property: DOMElement::$tagName HTMLPurifier

I got asked to edit the content on a website but whenever I edit an article and try to save it I get the following error: Undefined property: DOMElement::$tagName (/home/user/craft/app/framework/...
0
votes
0answers
40 views

Homepage is blank

Craft CMS 2.6.3017 I'm very new to Craft, so forgive me if this is a bit basic. I've cloned an existing Craft CMS site for a customer and set the site up so that 'index.php' is omitted from URLS. ...
1
vote
1answer
42 views

Cannot access assets - unable to open image

I'm on Craft 2.7.8 and cannot access some of my assets - getting Unable to open image ../html/assets/xxx.jpg error all the time. I've checked the owner, group and permissions dozen of times, ...
1
vote
2answers
59 views

Set Password on Test User Account in Localhost

I'm trying to set the password for a 'test' user account on my localhost test site. I don't have an email server to send the reset emails, so I've been using the copy URL method. When I do go to the ...
0
votes
1answer
30 views

Form fields not visible after creating content fields using A&M Forms plugin

I'm new to Craft 2, and I created about 20 new form fields in the Settings>Content>Fields section. I created a new group for them to go in. Then, I went to create a new Form, but I cannot see those ...
1
vote
1answer
16 views

Importing fields into A&M Forms plugin

I'm currently using the A&M Forms plugin and was wondering if I can import fields from the native Craft 2 fields? I have already created 20 or so fields that I will use in both the native ...
1
vote
2answers
56 views

Which twig file is being used and how?

I have a page in Craft (2.x) that displays several links and I was able to find which twig file had those links by searching the code base of twigs. Those links point to some Angular code with links ...
1
vote
1answer
98 views

Local DB SQL 'CDbException' Errors on Craft 2 site

Just tried to get a local site working again but getting all sorts of issues. I have updated the website online and downloaded the database, installed locally. I have also the craft/app folder to my ...
0
votes
0answers
17 views

Craft 2.7.4 - Creating staging, blank screen

We have a live website running with Craft CMS 2.7.4, now I want create a staging environment so I made a copy of the live website files and the DB, I changed all the links from https://www.website.com ...
1
vote
1answer
45 views

How to have Craft 3 and 2 on same host?

I have a Craft 2 installation that I'm upgrading to Craft 3. I've got v3 running locally in its own virtual host, but now I need to temporarily put the dev v3 instance in the same hosting account as ...
0
votes
0answers
23 views

EntryModel as model attribute doesn't get populated as model

I've created this custom plugin with a CP interface for a website running latest version of Craft 2. Each record in my custom table relates to an entry using an entryId. I've set up all the records ...
1
vote
1answer
23 views

bootstrap.php returns a value of 1 in Craft CMS

I have a Craft CMS instance that I created a copy of by tarring up the folder and then dumping the mysql database and then transferring that to a different server. On the target server I restored the ...
1
vote
1answer
59 views

Craft 2 Commerce 1 cart session expiry

Is it possible to change the cookie timeout just for the cart? E.g. I'd like to clear abandoned carts after X hours and keep all the other sessions untouched (e.g. user sessions etc). Please advise ...
1
vote
1answer
64 views

Pagination Slug Issue

I've setup a 'posts' section with a collection of posts. I'm trying to add pagination to the individual post entry. I've copied the pagination code from the Craft CMS documentation but I'm having ...
1
vote
1answer
1k views

Return JSON array without extra square brackets

I'm having difficulties to remove an additional set of square brackets or avoid including them within array. My JavaScript code currently accesses array's object at 0 index and therefore I'd have to ...
1
vote
1answer
57 views

Missing 'Plugin Store' tab in admin panel

I'm using Craft 2.7.9 and can't access the Plugin Store page. I've searched for fixes here but didn't find anything helpful. I've tried to access it directly via http://localhost:8888/admin/plugin-...
0
votes
0answers
15 views

Entries are being saved even when I try to upload files with the wrong extension

My Image service function throws an exception and sends it to the Craft logger that the extension is invalid. But my entry is being saved even though the field is set to only allow images. I am ...