users try to upload images through loki. Same error message to the end
user. For us these are images that have just been added to the site
On Feb 7, 9:47 am, Nathan White <
n...@natewhite.com> wrote:
> Hi Steve -
>
> I just looked at the editor_links_for_asset.php file. I suspect what is
> happening is that the site borrows an asset that no longer has an owner.
> This can occur when a site shares resources with other sites, and is then
> deleted. Reason currently lets you delete sites that are actively borrowing
> items. It should not do that, or at least it should force you to reassign
> those items to other sites.
>
> In any case, the code in editor_links_for_asset.php does this:
>
> $asset = new entity($id);
> $owner_site = $asset->get_owner();
> return 'http://' . REASON_HOST . $owner_site->get_value('base_url')
> .MINISITE_ASSETS_DIRECTORY_NAME.'/'.$asset->get_value( 'file_name' );
>
> You can see that if an asset does not have an owner, the call to
> owner_site->get_value('base_url') would cause a fatal error.
>
> I would suspect (though I'm not sure) you can fix the immediate problem by
> changing line 44 to this:
>
> return (!empty($owner_site)) ? 'http://' . REASON_HOST .
> $owner_site->get_value('base_url')
> .MINISITE_ASSETS_DIRECTORY_NAME.'/'.$asset->get_value( 'file_name' ) : '';
>
> I'm guessing that will result in Loki just not linking to the asset.
>
> What you really want to do though is find assets on the site that don't
> have an owner and give them one. We should have a nifty script to find
> orphaned entities and assign them to sites, and have an active issue for it
> We should make sure this happens for Reason 4.2.
>
> In the meantime, the best practice is to not delete old sites until you
> move or delete all the entities.
>
> Nate
>
>
>
>
>
>
>
> On Tue, Feb 7, 2012 at 9:05 AM, Steve <
sly...@gmail.com> wrote:
> > I have a minisite that is having trouble loading its assets in the
> > loki link creator.
>
> > From loki, the user sees this error:
> > Failed to load the assets: Server did not respond with an RSS
> > document.
>
> > The error log has the following:
> > PHP Fatal error: Call to a member function get_value() on a non-object
> > in /usr/local/webapps/reason/reason_package/reason_4.0/lib/core/feeds/
> > editor_links_for_asset.php on line 44, referer:
>