Hi Chris

> This is because it is trying to save to a bag that does not exist: "default".
The tiddler appears to be assigned this bag when it is dropped (or maybe it
gets it from the origin?)

Ah, yes, sounds like the plugin is coming in with a "bag" field, and TW5 is
blindly accepting it. I guess we should remove the "bag" field on import so
that the same processing would occur as with a manually newly created
tiddler?

> getting it as JSON results in JSON which is _not_ the expected structure
of JSON tiddler, it is the object structure with a single key of "tiddlers"
and sub object of a few tiddlers

The JSON structure you see is the correct format for the body of a TW5
plugin (which is just a bunch of tiddlers packed into one as a blob of
JSON).

If a tiddler has the type "application/json" does TiddlyWeb serve the text
field directly as the JSON representation, rather than serialising the
tiddler as normal? That's a bit unexpected if so. Is there a way I can
retrieve the ordinary serialized JSON representation?

Best wishes

Jeremy.









On Mon, Apr 7, 2014 at 6:35 PM, <[email protected]> wrote:

>
>
> Someone is experimenting with importing plugins into a TW5 hosted on
> Tank[1] and having some difficulties. I've tried to replicate their
> experience and am also having difficulties (but I'm not sure they
> are the same).
>
> There are at least two different issues:
>
> 1. When dragging a plugin[2] from its origin into the tank-hosted
>    tw5 there is a 409 conflict trying to save the tiddler. This is
>    because it is trying to save to a bag that does not exist:
>    "default". The tiddler appears to be assigned this bag when it is
>    dropped (or maybe it gets it from the origin?).
>
>    If I change the bag field the tiddler does save:
>
>    https://tank.peermore.com/bags/cjdtw5/tiddlers/%24%3A%
> 2Fplugins%2Fskeeve%2Flistselect.txt
>
> 2. However, since the tiddler has a type of application/json,
>    getting it as JSON results in JSON which is _not_ the expected
>    structure of JSON tiddler, it is the object structure with a
>    single key of "tiddlers" and sub object of a few tiddlers:
>
>    https://tank.peermore.com/bags/cjdtw5/tiddlers/%24%3A%
> 2Fplugins%2Fskeeve%2Flistselect.json
>
>    This means that the adaptor mechanism ends up with a tiddler
>    which has "undefined" text and other fields.
>
> Presumably a bit more manipulation is required in a couple different
> places in the stack.
>
> I'm not posting this as an issue as it is not clear what part of the
> stack should be held responsible.
>
>
> [1] https://tank.peermore.com/
>
> [2] The sample plugin is
> http://tiddlystuff.tiddlyspot.com/#%24%3A%2Fplugins%2Fskeeve%2Flistselect
> --
> Chris Dent                                   http://burningchrome.com/
>                                 [...]
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to