forked from jayallen/melody
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#314] Went through MT::CMS::Entry to have it use new MT::Asset->asso…
…ciation methods.
- Loading branch information
1 parent
e41d9cc
commit ee1a051
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit breaks asset association with pages.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on a fix.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just pushed to byrnereese/melody/lh-1005-broken-asset-assoc a possible fix for this. I first need someone to test to make sure that associations are properly found for entries and pages. Once this is confirmed, then I will write an upgrade routine that will modify the ObjectAsset table to properly reflect the right object type for each referenced entry/page. Right now they are all hardcoded to "page".
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error on opening page edit form
Internal callback died with: Can't use string ("MT::Asset") as a HASH ref while "strict refs" in use at melody/extlib/Data/ObjectDriver/BaseObject.pm line 404.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeing the association in the Assets widget of the editPage form, and in the "Appears in" widget of the EditAsset form. Same for pages and entries. However, the mt:EntryAssets (or mt:pageAssets) tags are not publishing the assets. The identical code works in an Entry archive but not in a page archive.
Here's the template code I'm using to test the publishing. https://gist.github.com/1199942
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should also note that I am now able to delete the association from the Page Assets widget as well. And I am seeing no errors in Melody or Apache logs during saving and publishing of pages and entries.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ee1a051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated MT/Template/ContextHandlers. Entry associated assets publish. Page-associated assets are not publishing.