Skip to main content

New answers tagged

0 votes

How can I add an element with an image to a section from the site?

If your imageFamily field is an image field, you can't assign the POST value directly to the field. You need to first save the image as an asset, then assign the ID of the asset to the imageFamily ...
MoritzLost's user avatar
  • 11.4k
0 votes

How can I add an element with an image to a section from the site?

You should be using the setFieldValue() method to set the value of a custom field, as documented at https://craftcms.com/docs/4.x/extend/element-types.html#saving-custom-field-values $family->...
Ben Croker's user avatar
  • 7,526
1 vote

How to disable X-Rewrite-URL Header in Craft CMS 3?

As far as I know Craft does not set that header automatically, so I'm guessing you are either looking at stale cache or your are behind a proxy like Cloudflare that is setting it.
Seth Warburton's user avatar
1 vote
Accepted

Disable Two-Step Publish Workflow?

As of Craft 4 this is no longer an issue.
theAdhocracy's user avatar

Top 50 recent answers are included