On Jun 30, 8:55 am, rakugo <jdlrob...@gmail.com> wrote:
> Hi pmario,
> I'm not entirely sure what you are trying to achieve here,
> but you shouldn't need to delete field values
I also thought so, that's why this post exists.

> If you are just trying to get a tiddler to save you need to run
> merge(tiddler.fields, config.defaultCustomFields);
In my example this wont work
>> eg: TS Structure 2
>> /pmario_public/ColorPalette

my ColorPalette@pmario is:
server.bag
        pmario_public
server.workspace
        bags/pmario_public
================

default.custom.fields is:

server.host
        "http://pmario.tiddlyspace.com";
server.type
        "tiddlyweb"
server.workspace
        "bags/pmario_private"
=================

Note my "SystemSettings" are:

chkPrivateMode: true
chkLoginTab: true
=================

> Note if a save is throwing an error, it is likely to be one of two
> things
> * you are trying to save a tiddler to somewhere you do not have
> permission to
That's why I need to get rid of the "server.permission" field for my
first example. But I don't want to get rid of the rest of the fields.
They may contain valuable info.
>> eg: TS Structure 1
>> /someone-else_public/ColorPalette
>> /pmario_public/ -
>> /pmario_private/ -
If server.permission is "read" only, and I copy/clone it to my
"writeable" space, the UI afterwords doesn't allow me to edit again.
It seems the store.saveTiddler doesn't touch the .permission, if it
saves to a writeable space.

> * the save is being refused as the correct etag is not set - however
> in a TiddlyWeb or TiddlySpace environment The TiddlyWebConfig/
> TiddlySpaceConfig plugin should be taking care of this for you.
If I copy/clone a tiddler, the etag is allways wrong, because its from
an included space. That's why I need to delete it.

> I'm assuming the issue you are having is the first example where you
> have an existing ColorPalette tiddler and you need to overwrite it.
> In this case I don't think there are any helper functions, but in
> terms of setting the fields server.workspace and server.bag - you
> should just delete these and run the merge function above which takes
> care of it.
As I wrote above I can't just clean the fields. I may need some of
them. I did some more thinking and saw, that my implementation is
wrong anyway. The tags can't be cleaned too. Just remove
"excludeLists" to make my new tiddler visible in the sidebar.

eg:
/someone-else_public/NiceColorPalette
/pmario_public/ColorPalette
/pmario_private/ -

I need to clone "NiceColorPalette" except the tag: excludeLists, if
there is one and overwrite my ColorPalette including all its fields.
Not just only the text.

But first I would want to move my /pmario_public/ColorPalette to my
"archive" bag. Are there any functions allready?

=======
I think there shouldn't be any need to mess around with the "server."
fields,
There should be a store.ABC API, that handles this.

eg: store.moveTiddler(), store.cloneTiddler()  that also handle the
"server." fields stuff. If they are called at a vanilla TW, they
should fall back to store.saveTiddler() or something similar.

-m




-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to tiddlywikidev@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywikidev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to