[ 
https://issues.apache.org/jira/browse/SHINDIG-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734610#action_12734610
 ] 

Chris Chabot commented on SHINDIG-1125:
---------------------------------------

That's an interesting question that I ran into earlier this week as well. 

For the time being I've committed a fix to partuza to generate a temporary 
token for the metadata request so not to trigger that error anymore, but I also 
agree that metadata requests don't necessary require all the external resources 
to be loaded.

It gets to be a bit tricky because some external resources are required (for 
instance the message bundles are required to resolve the title, directory 
title, thumbnail, screenshot, etc all of which can be localized), however 
preloading isn't required for any of that, so the fix might be as simple as (in 
GadgetFactory.php):

if (! $gadget->context instanceof MetadataGadgetContext) {
    // Add preloads to the request queue
    foreach ($gadget->getPreloads() as $preload) {
   ... etc original code..
   }
}

I'm knee deep in OSML & Template library coding, but I'll take a look at it 
once that's done (or if you have a few moments to implement test that change, 
patch would be more then welcome!)


> Preloading is done on metadata request
> --------------------------------------
>
>                 Key: SHINDIG-1125
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1125
>             Project: Shindig
>          Issue Type: Question
>          Components: PHP
>         Environment: Shindig PHP trunk
>            Reporter: Matthieu Huguet
>            Priority: Minor
>
> Hi,
> I don't know if it's a bug, but when I make a JsonRpc metadata request to get 
> informations on a gadget (which contains a <Preload>), the preload request is 
> executed.
> Is it normal/necessary ? 
> I find that because I've a gadget with a signed preload request in it.
> When I make a metadata request (without security token, because it's for my 
> application directory), I've got this exception : "Signed preloading 
> requested, but no valid security token set"
> Thanks
> Mat

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to