RelatedEntries updated for Mango 1.3
I decided I needed to sort of rush out this update, because as-is Related Entries breaks the post/page entry form validation in Mango 1.3.x. So first, here's your download information:
- Plugin version:
- 1.0
- Last Updated:
- 2009-02-27
- Requires:
- Mango Blog 1.3
- Auto-install URL:
- http://fusiongrokker.com/get/RelatedEntries
First, the bad news. Just like with LogViewer (and upcomming plugin updates), I've decided to change the plugin id, which means you can't install this version over top of the old version. You'll first have to manually de-activate and delete the old version; then you can use the above URL in the auto-installer. I'm sorry! The good news is that none of your old related entries data will be lost. Sorry for the inconvenience, but I promise not to change the ID of this plugin again.
What's changed?
Aside from some file locations and names, not much. Since jQuery is now built into Mango Admin, this plugin's inclusion of the library caused a conflict which prevented form validation from working. So the major change with this version, besides updating it for Mango 1.3.x, is that jQuery isn't included any more. There aren't any functional differences.
When time permits, there are a couple of small bugs that I need to work out, so I hope to have another update in March some time.
Posted in Mango | My projects | 5 Responses
In v1.0 you've changed the custom field key, so it doesn't recognise any related entries that were set up using the old key - they just appear as standard custom fields on the edit post page.
The issue occurs on line 113 in the plugin.cfc:
<cfset local.relEntryObj = blogManager.getPostsManager().getPostById(listFirst(local.relEntryId,'|')) />
You need to scope the blogManager object to the APPLICATION scope.
<cfset local.relEntryObj = application.blogManager.getPostsManager().getPostById(listFirst(local.relEntryId,'|')) />
After I did that the related entries displayed just fine.
Thanks again for the plugin.
<cfset local.relEntryObj = getManager().getPostsManager().getPostById(listFirst(local.relEntryId,'|')) />
That would better comply with the rest of your code.