Questions tagged [onsaveentry]

The tag has no usage guidance.

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

Redirect to paginated page after saving Entry within CP

If you are editing entries and then save the entry via the save button, craft redirects you back to page 1 of the element index. I feel we should be able to set our own options as to if we want to ...
1
vote
3answers
262 views

How to change an entry's slug on EVENT_AFTER_SAVE_ELEMENT?

My entries' titles are auto-generated from several fields values on first save. When one of these fields values change, I would like to update the auto-generated slug also: Event::on( \craft\...
1
vote
0answers
35 views

Can't set structured entry parentId in BEFORE_SAVE event using field data

I have created an event that is called on beforeSave within my plugin. Code below: Event::on( Entry::class, Entry::EVENT_BEFORE_SAVE, function(ModelEvent $event){ /...
0
votes
1answer
84 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 ...
1
vote
1answer
42 views

Allow registered end-user to update entry, but limited only to specific fields (Craft 3)

I want to allow end-users (registered as users in Craft) to update only specific fields of an entry. I know that only those fields included in the form are being updated; but this isn't secure enough. ...
1
vote
1answer
106 views

Radio buttons in matrix field not saving

Craft CMS version 3.0.9 (updated from 3.0.1 to try and fix). I have a layout field in a matrix box with the radio buttons field type with the options normal (default), full, left, right. When saving ...
2
votes
0answers
117 views

Bulk resave user entries to trigger onSaveEntry event

Is it possible to bulk save user entries to force an onSaveEntry event. I added a new custom preparse field to Users, but need to trigger a save event to propagate. Regular sections can reindex by ...
2
votes
2answers
225 views

Modifying entry with 'onBeforeSaveEntry' event

I'm trying to modify a field on an entry before it is saved. What I'm trying to do is use a field from a linked entry to populate the same field on the entry being saved. From logging I know the ...
1
vote
1answer
65 views

Changing asset of entry's assetfield via entries.onBeforeSaveEntry

I'm trying to add an asset to an entry's assetfield when the entry is saved by using the onBeforeSaveEntry service provided by Craft. craft()->on('entries.onBeforeSaveEntry', function(Event $event)...
5
votes
1answer
990 views

Bulk resave entries to trigger onSaveEntry event

I have a site with a hundred+ or so entries. I've added a new field to my entry template, but it won't take effect until it's been activated by a onSaveEntry event. I've gone through maybe 15 ...
2
votes
1answer
635 views

Craft\EntryModel and its behaviors do not have a method or closure named “ui”

I'm getting this error when saving a post which has a Matrix field. Craft\EntryModel and its behaviors do not have a method or closure named "ui". I have ran a search in my templates and don't have ...
3
votes
3answers
511 views

Updating the postDate field from a plugin?

I think I'm almost there with this one but obviously missing something as the postDate is not updating. I have the following in an onSaveEntry event. It's saying it's successful but the postDate does ...