Kentico Support Roundup, Summer 2019

Posted: 7/17/2019 10:20:42 AM by Chris Bass | with 0 comments
Filed under: API, How-To, Macros, Support-Roundup, Upgrade
So I thought I'd be doing these quarterly, but then I had other stuff to talk about :) Here's a few of the more interesting Kentico Support tickets I've had lately. Having a direct line to support engineers - and sometimes, Kentico's developers themselves - is a major help when you start getting into deep Kentico functionality.
  • Firstly, here's a nice description of what happens behind the scenes during a kentico upgrade
  • When working with text fields that accept macros, if it's one of the Kentico built-in fields it probably has security tags on it - if you see "#" at the end of your macro, then this is it. In the backend, that *Actually* looks like "|(user)username|(hash)guid" - a much longer string, that if your editor decides to, could break or erase.
  • Luckily, there's actually a function that you can use to translate this:  MacroSecurityProcessor.RemoveSecurityParameters, and  MacroSecurityProcessor.AddSecurityParameters. The former turns all those hashes and guids into the "#" you see, and when you save, the latter puts them back in (under a context of your choosing - either you can backup who had signed it before, and pass that in to restore them, or you can just resign them with the current user). This way the editor never sees the security tags, and can just focus on writing their macros.
  • In case you don't know, when you are working with the UI in a Kentico custom module, Kentico passes around query string parameters (based on the element chosen on the top of the Properties tab), and if you're using the CMSPage type, you have access to the EditedObject property, which comes from those parameters. If you're writing a custom ui you can manually pass those parameters down
  • There's no way in Kentico to send marketing emails but ignore the Opt-Out list. So if you're planning on having some service-level emails (which a user shouldn't be able to opt-out of) and Marketing emails, you're going to want to put them in separate feeds so you can unsubscribe from *one* feed, and not give the user the ability to unsubscribe from *all* feeds. Or, you have to give up on doing tracking of your service-level emails. Or use a third-party service for your emails.
  • There's no particular guidance on when to add a User-related field to the User object, or UserSettings. I personally think whether it's about 'the user' or 'the user's account' is a good separation - so, a 'subscription date' might be a UserSettings field, but 'hair color' would be a User field. 
  • As of March, In Kentico 11 (at least, .0.26 - but I don't believe it was ever addressed), changing a page type field's name causes any Versioned pages using that type, to have their Form tab show a blank value. I believe this is because the Form tab is using the version history (which hasn't got an update yet). To work around this, *before* you change a field name on a document, you can use the Pages tab of the workflow, and use the mass action "Remove workflow and keep currently published data". Then you can change the field name safely. (If you've already done the change, just rename the field back to what it was, the data's still there in the past version of the document.
  • Once a Staging task is created, it's not possible to add/remove/change its Task Group value. At least, not without directly editing the database.
  • In Smart search, the only content in Pages indexes that is indexed is the text in editable regions, and the Form tab. Notably, other widgets are *not* indexed content in a Pages type index. If you want those indexed, use a Page Crawler index.
  • There are no settings to hide untranslated pages from the Content tree in Kentico - you can switch to the Listing mode to filter by language, but if you have a very large culture, and a very small second-culture versiion of the site, there's going to be a lot of 'untranslated' documents sitting around in your CMS tree.
  • Lastly, Kentico Support was where I got guidance for the SendGrid notifications, Site Separation/User Prefixes logic, and verified some of my understanding on setting up an MVC site.
Blog post currently doesn't have any comments.
 Security code