Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [entry]

The tag has no usage guidance.

0
votes
0answers
19 views

Usually while editing entries - Invalid entry type ID: 24

Usually while editing any entry in Craft 3, that's what i get Invalid Configuration – yii\base\InvalidConfigException Invalid entry type ID: 24 1. in /usr/home/work/domains/test.testdev/vendor/...
1
vote
1answer
19 views

relatedTo() only on one field?

I have a Product entry type that contains a field for Components (which are also products) and a field for Related Products (again, also Products). I want to be able to find a parent product from a ...
1
vote
1answer
29 views

How can I find entries that link to a given entry?

I'm retiring a section of my website and want to remove all existing internal links to this section. Is there an existing way to find any links to each entry in that section? These links are all in ...
1
vote
1answer
102 views

How to modify and save a field in entry on EVENT_AFTER_SAVE in a plugin?

I'm trying to build my first little plugin. I'm stuck with a problem: I need to modify the value of the specific field reference, right after the saving of the entry because the new value is supposed ...
1
vote
2answers
37 views

How can I set an entires status via ajax from a front-end form?

I am trying to set an entires status to disabled from a front-end form. Here is the click event listener I am using: $(document).on('click', '.delete', function (event) { let $this = $(event....
1
vote
1answer
26 views

Displaying gallery when viewing category page or entry with related categories - code review

I have a gallery in my site's <footer> with images that are defined in a matrix field on each of my categories. If I'm viewing a category page or an entry with related categories I want to ...
3
votes
1answer
24 views

Output values from all entries in a specific section EXCEPT those with a specific category id

Currently, this is NEARLY doing what I want except instead of the output being entries that do NOT have the id, it's output is ONLY the entries with the id. I'm not sure why, since I've included the '...
1
vote
1answer
34 views

Setting a default entry for the entry field

I have an entry field that is a selector tool for the page call to action at the bottom. I have a channel of four or five entries and I'd like one of them to be the default selection so it's one less ...
1
vote
1answer
32 views

Non-numeric characters in number field producing errors

Craft 3 is giving me this error when my client enters non-numeric characters into a number field on an entry: number_format() expects parameter 1 to be float, string given Is there a way for it to ...
2
votes
1answer
19 views

How to show entires from past 12 months?

I need to display entries from the past 12 months. I'd like to create an entry query and set the timeframe of the entries I need.
-1
votes
1answer
42 views

Entry not saving when Redactor bold

I'm having a weird issue with the Rich Text Editor (Redactor -> simple.json, only "bold" and "italic") on newly added fields and only ONE (that i know of) older field. Every time i add a "bold" format ...
2
votes
1answer
51 views

Why does my entry language selection look different from examples?

All the examples look like this: Mine looks like the image below where you have to select the site from that top left dropdown and then there are some enabled things on the right:
1
vote
1answer
78 views

Unable to delete some entries

It is weird that I can delete some entires in the app but some I can't. When selecting specific entry to delete, I don't see the option to delete it. I only have "edit entry" and "view entry". In some ...
1
vote
1answer
42 views

Entries from matrix should not appear in loop

I have a Matrix with an entry field. I have a Loop which is looping entries out of a section. Goal: The entries from the matrix should not appear in the loop of the section. So the Matrix defines ...
-1
votes
1answer
24 views

Entry does not publish [closed]

The Craft CMS I am using doesn't want to publish the blogs I am writing. Why?
1
vote
1answer
28 views

Entry Form: Populate checkbox list from another entry and save options in entry

I am trying to load some options in to a checkbox list from another entry so that a user and save select them form a checkbox list but I am unable to save the Entry Form with their selection. I have ...
1
vote
1answer
30 views

How do I target the 3rd entry and only that entry?

I am trying to build an Index page and assign a specific card template to the 3rd entry and only the 3rd entry. {% set items = craft.entries.section('posts').all() %} {% for cardC in items.offset(2)...
0
votes
0answers
18 views

Empty Asset URL Error [duplicate]

Currently trying to call an Asset URL but it's returning an error as some categories do not have an Asset uploaded yet. Impossible to invoke a method ("url") on a null variable. Code running it: ...
1
vote
1answer
30 views

New entry showing under old one

I'm working on a website that was developed by someone else before me, I added a new section and template, I uploaded all my files, created my new section and field and created my first entry ...
1
vote
1answer
40 views

How to limit number of entries to a given user/user group

I have a site where users can add entries of an entry type/section called Listings. I would like to limit the number of Listings to a maximum of three per user. In another CMS I did this by writing ...
1
vote
1answer
43 views

How to get entries with or

it is possible to do like this: $users = Entry::find() ->userLevel('>3') ->or group('admin') So in database level,the sql will go like this: select * from users where users.userLevel ...
2
votes
1answer
200 views

Title field character length

Is it possible to limit the title field in an entry? As with other fields I can adjust so that it only takes a certain amount of characters.
1
vote
1answer
25 views

How to hide {{ entry.title }} on a {structure} page but show it on a {structure}/{category-slug} page

Here's the breakdown: » structure with two categories. Each category has +10 entries. » Template is structure / index.html and _entryview.html I'd like to show two links and a description of both ...
1
vote
1answer
298 views

Craft 3 multi site publish options

If a user has permission to publish on multiple sites, he by default publishes to all of them. If he wants to exclude some sites, he needs to go in each one and turn off the post for that site. This ...
0
votes
0answers
21 views

Setting an Entry field using sum

I'm looking to set a 'score' property on my "category" field, this will be done by calculating how many entries are within that category similar to a 'Trending' feature. Is there any way to set a ...
0
votes
1answer
92 views

How can I show multiple entry types in the same page

I have two entry types in a same structure, I want to get some values from these two types in a same page. Is it possible? I tried: {% set entry = craft.entries.section('businessProfile').type(['...
1
vote
1answer
180 views

How Do I Add a rel=“canonical” HTTP Header to Embedded PDF Files?

I'm working on project where I would like to directly embed PDFs onto web pages. We'll be using Google's PDF viewer as the embed tool and implementing via a macro. Here is the macro as it stands now: ...
1
vote
1answer
170 views

How can I add programmatically a Tag after SAVE_ON event in case of Assets types

We have to update the Asset after the SAVE_ON event, and the Craft::$app->elements->saveElement($asset); Not seems to be working (it is getting timed out). So what is the best pratice to ...
1
vote
1answer
149 views

How to create manually an Entry from command line

I would like to migrate content from external source to my Section model. So I have to create Entries manually. Is there any better way to do this beside this snippet from the documentation: $entry = ...
1
vote
1answer
89 views

Include the URL of a related entry field

I would like to add the URL of the channel entry I have selected (atm 2 channels are available to choose from), so I would like a url like: summerhouses/product1 or greehnouses/product2 how would ...
1
vote
1answer
306 views

Anyway to extend Craft Entry query search in Craft 3

I've had to manually do an SQL call to the get correct results but I was hoping there would be a tidier way of achieving this in Craft 3? $query = ( new Query() ) ->select('craft_content.title, ...
1
vote
1answer
164 views

Unable to update slug in Craft 3 for single enteries

I have created some entries for type single but now I am not able to update their slug even I have updated the title
1
vote
1answer
90 views

Changing first matrix block

I'm trying to target the first matrix block and changing the structure of the HTML, but nesting an IF statement within the loop but it's actually not doing anything, instead it's just displaying both ...
1
vote
1answer
57 views

Entry Count plugin performance / template optimisation

I'm using Ben Croker's Entry Count plugin in my News channel but have noticed a huge performance hit, I know its probably down to how I am loading the entries in to my template so I am looking for ...
1
vote
1answer
320 views

Craft 3: how can I set an ordered list of all sites, and set a display name different from the site name?

The Craft 3 multi-sites is very useful. However, I found the list dropdown while editing an entry confusing and awkward in my case. I have several sites group, each containing a localized version of ...
1
vote
2answers
204 views

Sort entries by time part only of DateTime object

I am trying to filter and sort show entries by what time they begin display the current show I have two fields, startTimeand endTime, and while Craft lets me display only the time part in the ...
0
votes
1answer
57 views

PHP error after adding new field

I've added many fields in the past with success but today, on my local MAMP server, after adding a new field to a Matrix and saving, I'm getting a PHP error when I try to view the entry's admin page, ...
1
vote
1answer
51 views

Programmatically Setting Entry Type Via Javascript

At the moment I'm trying to create a script that is supposed to be run (by chrome extension) on page load (of the new entry page) that with automatically set the entry type. The name of the entry type ...
1
vote
1answer
50 views

Save an entry with tags

I have a project that the user choose a tag (tags are already created) and save the information. I try save a entry which has a tag field, all the stuff saves, but the tags don't. I try search ...
1
vote
1answer
39 views

craft.entryRevisions.getDraftsByEntryId(entry.id) is returning an empty array

I'm trying to get the drafts for the entry on the front end to populate my plugin on the sidebar but cannot get the drafts returned with this code in a Twig template. entry is an EntryModel here. ...
1
vote
1answer
317 views

Matrix Entry form

I'm trying to post a public entry form in a matrix field. I've added a count so that the block id is unique. However it's just clearing the matrix field and saving a single entry. {% set matrix = ...
4
votes
1answer
312 views

Entry Form - Multiple Entries & Entry Type & Parent

I'm building an MVP for a project, I'm using Craft and would like to: Create an experiment (/experiments/) Create multiple cages for the animals within the previous created experiment eg. 5 cages - (/...
2
votes
2answers
45 views

Re-using includes when the object type changes (entry vs block) - what is the best method?

So I am trying to reuse some include files built for a matrix builder that are also in some instances used as stand alone fields (Video, Downloads etc). The way I have coded this is that the object/...
1
vote
0answers
34 views

Share: Getting 'Forbidden' message when sharing externally

I've run into an odd issue and I can't seem to figure out what is going on. Normal Process: I click the Share arrow on a disabled entry. I copy the tokenized link and send it out. Folks without ...
1
vote
2answers
283 views

Saving new entry via Ajax then immediately showing it

I’ve created a very simple comments system whereby comments are set us a channel, with each (comment )entry related to a main entry from another section. Works fine. I’ve set up editing and deleting ...
1
vote
1answer
38 views

Grabbing an asset field from Page A to display on Page B

I'm trying to display an asset that the client has selected to show up on the main page, and have it display on a totally different page. This sounds simple but I keep getting errors (and im learning)....
1
vote
2answers
209 views

Craft entries won't save (new or edits)

So I am trying to create a new entry, but every time I click save, nothing is actually saved. (see gif) THINGS I HAVE TRIED: Overwriting the app folder with a freshly downloaded one (I am already ...
1
vote
1answer
80 views

How to check for a value OR NULL on custom enddate field using yii syntax when calling entries?

I have a section of 'deals/coupons' with custom startDate and endDate. These are needed so the client can load up a bunch of deals but only have them render to the page when a particular deal is '...
1
vote
1answer
271 views

How to get fields from another section?

I need to get data from fields from another section. My code is: {% for kontaktEntry in craft.entries.section('kontakt').entry.kontakter %} <div> <a href=...
3
votes
1answer
267 views

Front End Editing with Entry From

I need to allow store managers to edit their store. I'm most of the way there and have the title field and a couple of other plain text fields set up. However there isn't any documentation available ...