Categories
CMS Mastering Development

Deleted rows from elements_sites hunting stray slugs now I can’t login

Working on a migration up/down testing I went through and deleted TOO much from the element_sites table to remove unwanted slugs, not understanding really what’s in there. Now I understand many elements are in there and I’ve deleted some vital stuff without a backup. Is there a way to perhaps use these config/*.yaml files to […]

Categories
CMS Mastering Development

Disable Two-Step Publish Workflow?

I recently updated to Craft v3.6, which appears to have changed the publishing workflow to require first publishing the draft, then saving the file in order to get back to the entries list. Is there any way to revert to the previous workflow of being able to just press a single button to create a […]

Categories
CMS Mastering Development

Write project config to cloud storage

I’m on a read-only filesystem using Google App Engine Flex. I was able to write my cpresources to cloud storage using a plugin, however, now I need to have project.yaml be written elsewhere. perhaps cloud storage as well. Not sure how to approach this

Categories
CMS Mastering Development

Nitro 2 on WSL craft failed permission change in cpresources

I get the following yii exception after installing and adding a Nitro2 site to WSL. Failed to change permissions for directory "/app/web/cpresources/1453c57f": chmod(): Operation not permitted cpresources permissions have been set to 777 imported project is running craft 3.3.15

Categories
CMS Mastering Development

Freeform form throws error on submitting hidden field with JSON

I’ve been running into a strange error with the Freeform plugin. I have made a form that has a hidden input field which gets occupied with JSON. This JSON data then is decoded in the e-mail notification for correct displaying. A little more info for clarification: The user can select multiple products from different product […]

Categories
CMS Mastering Development

Trouble with Custom Command in Custom Plugin. How do I do it?

I found the documentation here very confusing: https://craftcms.com/docs/3.x/extend/commands.html#module-setup I’ve scaffolded a simple test plugin from https://pluginfactory.io/ with "Console Commands" enabled and I’ve pulled my plugin into composer via ‘path’. The plugin shows up fine in the Craft UI, and so I installed it. However, I can’t get the new command to display in the terminal […]

Categories
CMS Mastering Development

Assets S3 Cache Duration and CP Thumbnails

What does everyone consider a sensible cache duration to use when using Assets with S3/Cloudfront? Is 3 hours sensible or should it be longer? Secondly, does this have any impact on the assets being displayed within Craft? Listing Asset directories takes a while due to my connection speed I’m sure but aren’t these assets cached […]

Categories
CMS Mastering Development

Entry list field get duplicated entries from specific section

I have some weird behavior when I have an entry list field (in a super table, but I get the same behavior from the native entry list field type). When I select an entry from a certain section, it will populate 2(!) entries in that list, which point to the same entry after save. It […]

Categories
CMS Mastering Development

Creating 1000+ entries with numerically generated data

I am migrating some entries into Craft for the first time and my saveUp is quite simple where I use the saveElement function. The problem is after doing a few safeUp’s and safeDown’s I’m getting some appended numbers on my slugs e.g. ‘title-07’ when ideally it would just stay as ‘title’. The slug is based […]

Categories
CMS Mastering Development

Registering events for a specific feed in Feed Me

I’m working with Feed Me to run several feeds, bringing in multiple Entry types. I need to do some additional preparation work via an EVENT_AFTER_PARSE_FEED handler, which works well when I only have a single feed, but fails when I add a second feed. I want to run the event handler for Feed A, but […]