Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: r is null #1

Open
linonetwo opened this issue Apr 14, 2019 · 35 comments
Open

TypeError: r is null #1

linonetwo opened this issue Apr 14, 2019 · 35 comments

Comments

@linonetwo
Copy link

After I click "Allow" on:

Do you allow creation of 
  /public/tiddlers
  (need r/w access) ?

Console errors: TypeError: r is null and nothing created.

@bourgeoa
Copy link
Owner

You need to allow read/write to /public/tiddlers with the rainbow pane edit ACL permission

@linonetwo
Copy link
Author

Do you mean add https://bourgeoa.solid.community/public/tiddlywiki/ with read/write permission?

@linonetwo
Copy link
Author

linonetwo commented Apr 14, 2019

But I'm the owner of my POD, I should have all permissions.


Update: https://github.com/solid/node-solid-server#upgrading-from-version-4

starting from version 5, third-party apps are untrusted by default. To trust a third-party app, before you can log in to it, you first need to go to your profile at example.com/profile/card#me (important to include the ‘#me’ there), and then hover over the ‘card’ header to reveal the context menu. From there, select the ‘A’ symbol to go to your trusted applications pane, where you can whitelist third-party apps before using them. See also nodeSolidServer/node-solid-server/issues/1142 about streamlining this UX flow.

@bourgeoa
Copy link
Owner

No in your own solid pod where the app cannot set permission

@linonetwo
Copy link
Author

I'm confused, how can I save to my own POD?

@linonetwo
Copy link
Author

Where do you think is the line that this Error happened?

@bourgeoa
Copy link
Owner

bourgeoa commented Apr 14, 2019

Your pod is by default the root of your WebId or the solid pod if you put in one

@bourgeoa
Copy link
Owner

The information error is in solid-file-widget

@linonetwo
Copy link
Author

Can you descript the steps you add permissions?

@linonetwo
Copy link
Author

linonetwo commented Apr 14, 2019

屏幕快照 2019-04-14 下午4 02 46

My WebID have full control of my POD, so there should not be permission problem when saving things to my POD if I log in with my WebID.

@bourgeoa
Copy link
Owner

Go to your pod/public/tiddlers select the rainbow pane and add everybody to owners

@linonetwo
Copy link
Author

linonetwo commented Apr 14, 2019

But there is no /public/tiddlers, do you mean create one by hand first?

I thought it would be created automatically.

@linonetwo
Copy link
Author

And I think you should not add everybody to owners. Otherwise, everybody can delete your wiki.

If you login your WebID, you already have all permission in sub-folders.

@linonetwo
Copy link
Author

Oh, you should add this to the Readme, after I create that folder manually, this tiddler works.

@linonetwo
Copy link
Author

linonetwo commented Apr 14, 2019

I have full control of /public/tiddlers, but it still not working.

屏幕快照 2019-04-14 下午4 23 58

It's not saving things.
屏幕快照 2019-04-14 下午4 24 53

@linonetwo
Copy link
Author

Should I create a ./main inside /public/tiddlers manually?

@bourgeoa
Copy link
Owner

Ok I made it work following these steps in a full new solid pod v4.3.1 :

  • try to login
  • if it says do you allow creation of /public/tiddlers --> refuse
  • goto your solid pod and
    ** create /public/tiddlers
    ** in /public allow
    Set the sharing of folder contets separately from the sharing for the folder
    ** in /public/tiddlers add everybody to owners rights
  • go back to tiddliwiki and login. It should work

I used chrome browser with both :

Whenever you got a 500 error clear the local storage in the browser.
solid server v5.xx as a bug that breaks the synchadaptor syncing

@bourgeoa
Copy link
Owner

bourgeoa commented Apr 14, 2019 via email

@linonetwo
Copy link
Author

I'm using solid-server V5.

So in V5, folder creation is not working, and it's happened in solid-file-widget, am I right?

I may take a look into it.

@bourgeoa
Copy link
Owner

No in V5 see bug #1170.
You should be able to create the folder but not to create tiddlers due to misuse of encode URI by the server. Saves "Draft%20anything.txt" in lieu of "Draft anything.txt"as exemple. Test and look at a .ttl folder

@bourgeoa
Copy link
Owner

Happy if you find the origin of the 500 error in solid-file-widget. There is a browser test in /demo

@bourgeoa
Copy link
Owner

bourgeoa commented May 2, 2019

I see you are reworking the app. Nice
I recently come to https://cdn.rawgit.com/abesamma/TW5-editions/78846468/empty.html
With a very interesting concept including a serviceworker's handler for use as a webapp and disconnected.

I have begun some work to convert tiddlers.json to RDF.ttl both ways.
I shall send you that, I hope later today.

I am interested with you intentions with RDF so as to be at least compatible.

@linonetwo
Copy link
Author

linonetwo commented May 2, 2019

Hi, I think the ttl can be like this:

index file stores SkinnyTiddlers (without Text tiddler field):

@prefix : <#>.
@prefix pub: <>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix terms: <http://purl.org/dc/terms/>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
@prefix tid: <tiddlywiki/>.
@prefix st: <http://www.w3.org/ns/posix/stat#>.
@prefix tur: <http://www.w3.org/ns/iana/media-types/text/turtle#>.
@prefix tiddly: <https://tiddlywiki.com/#>.

<sometiddler.ttl>
    a tur:Resource, ldp:Resource;
    terms:created "2019-05-02T09:37:18Z"^^XML:dateTime;
    terms:modified "2019-05-02T09:37:18Z"^^XML:dateTime;
    st:mtime 1556789838.111;
    tiddly:Title "SomeTitle";
    st:size 1.
<anothertiddler.ttl>
    a tur:Resource, ldp:Resource;
    terms:modified "2019-05-02T09:37:18Z"^^XML:dateTime;
    st:mtime 1556789838.111;
    st:size 1.

We can use https://tiddlywiki.com/# as name space, and describe all tiddler fields in CapitalCamelCase.

So this index file will contains all fields from https://tiddlywiki.com/#TiddlerFields , except the Text field.

What do you think?

@linonetwo
Copy link
Author

linonetwo commented May 2, 2019

And actual tiddler is just to add a text field:

@prefix : <#>.
@prefix pub: <>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix terms: <http://purl.org/dc/terms/>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
@prefix tid: <tiddlywiki/>.
@prefix st: <http://www.w3.org/ns/posix/stat#>.
@prefix tur: <http://www.w3.org/ns/iana/media-types/text/turtle#>.
@prefix tiddly: <https://tiddlywiki.com/#>.

<>
    a tur:Resource, ldp:Resource;
    terms:created "2019-05-02T09:37:18Z"^^XML:dateTime;
    terms:modified "2019-05-02T09:37:18Z"^^XML:dateTime;
    st:mtime 1556789838.111;
    tiddly:Title "SomeTitle";
    tiddly:Text "asdfasfhusadfupiadshfohdsaoifhoaidshf";
    st:size 100.

I think this is enough for interoperability, and I hope searching and reasoning can be done on those files.

@linonetwo
Copy link
Author

Wait, why not just use LDP container as an index file?

@bourgeoa
Copy link
Owner

bourgeoa commented May 2, 2019

Index file is not needed and can be build at run time. I kept it because it was in the model I followed.
for rfd I was proposing a bit more to open the possibility to reuse by non tiddlywiki apps.
See the file join that convert json to ttl. I never endup the way back ttl to json with the fact that tags are multiple.
convertAndBuild1.zip

@linonetwo
Copy link
Author

linonetwo commented May 2, 2019

What's the _canonical_uri?

Most vocab you choose is reasonable, much better than what I thought (tiddly:Title and tiddly:Text)

The one I think can improve is "tags":"schema:keywords", I think tag can be represented by http://www.w3.org/1999/02/22-rdf-syntax-ns#type, aka, a

<sometiddler.ttl>
    a tur:Resource, ldp:Resource;
    a <SomeTag.ttl>;

@bourgeoa
Copy link
Owner

bourgeoa commented May 3, 2019

Tag is an index and not a tiddler

@bourgeoa
Copy link
Owner

bourgeoa commented May 3, 2019

_canonical_uri is for example the URL of a external file like music, photos ....

@bourgeoa
Copy link
Owner

bourgeoa commented May 3, 2019

For a structured definition list of tiddlerfields goto https//tiddlywiki.com tag concepts and choose tiddlerfields

@linonetwo
Copy link
Author

Ok, sometimes a tag can be another tiddler, while sometimes not.

Maybe just store it as a string of schema:keywords.

Will it be comma separated value?

@bourgeoa
Copy link
Owner

bourgeoa commented May 3, 2019

Yes it is comma separated value

@linonetwo
Copy link
Author

Why it's hard to convert back from ttl to json hard? Just parse the CSV then fill in the tags field, isn't it?

@bourgeoa
Copy link
Owner

bourgeoa commented May 3, 2019

Yes but for me parse is not clear. I need example s

@linonetwo
Copy link
Author

I didn't think too much, I will just retrieve the object of schema:keywords, and object.split(',')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants