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

CSS cannot PATCH lists [ ] #31

Open
bourgeoa opened this issue Nov 24, 2024 · 3 comments · May be fixed by SolidOS/solid-panes#390
Open

CSS cannot PATCH lists [ ] #31

bourgeoa opened this issue Nov 24, 2024 · 3 comments · May be fixed by SolidOS/solid-panes#390

Comments

@bourgeoa
Copy link
Member

bourgeoa commented Nov 24, 2024

@timbl @michielbdejong

In /preferences/ Manage your Trusted App I tried to add https://podpro.dev
This should insert

:me acl:trustedApp
            [
                acl:mode acl:Append, acl:Control, acl:Read, acl:Write;
                acl:origin <https://podpro.dev>] 

but failed with error 422. Some details

Preview

	{name: "UnprocessableEntityHttpError",…}
	details
	: 
	{}
	errorCode
	: 
	"H422"
	message
	: 
	"An N3 Patch delete/insert formula can not contain blank nodes."
	name
	: 
	"UnprocessableEntityHttpError"
	statusCode
	: 
	422

Payload

	@prefix solid: <http://www.w3.org/ns/solid/terms#>.
	@prefix ex: <http://www.example.org/terms#>.

	_:patch

		  solid:inserts {
			<https://bourgeoa2.solidcommunity.net:8443/profile/card#me> <http://www.w3.org/ns/auth/acl#trustedApp> _:bn_wrjr7 .
			_:bn_wrjr7 <http://www.w3.org/ns/auth/acl#origin> <https://podpro.dev> .
			_:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .
			_:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Write> .
			_:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Append> .
			_:bn_wrjr7 <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Control> .
		  };   a solid:InsertDeletePatch .
@michielbdejong
Copy link
Collaborator

Thanks for spotting this! I think maybe this patch is actually incorrect. The _:patch in the subject is fine, but why is there a blank node _:bn_wrjr7 in there? Can we change mashlib so that it uses a named node there?

CSS indeed checks this

And the spec indeed specifies this

michielbdejong added a commit to michielbdejong/solid-panes that referenced this issue Nov 26, 2024
The spec https://solidproject.org/TR/protocol#server-patch-n3-blank-nodes BlankNodes inside N3 PATCH entries, so let's use a NamedNode here?

Hopefully this can fix solid-contrib/pivot#31
@bourgeoa
Copy link
Member Author

bourgeoa commented Nov 26, 2024

@michielbdejong
I suppose that blank nodes are not allowed because they are not stable.
Why not just add a parse/serialize of the PATCH.
The above PATCH would be rewrited as :

@prefix : <#>.
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix c1: <https://bourgeoa2.solidcommunity.net:8443/profile/card#>.

[
    a solid:InsertDeletePatch;
    solid:inserts
            {
                c1:me
                    acl:trustedApp
                            [
                                acl:origin <https://podpro.dev>;
                                acl:mode
                                acl:Read, acl:Write, acl:Append, acl:Control
                            ].
            }
].

@michielbdejong
Copy link
Collaborator

Ah, I went for a different approach in SolidOS/solid-panes#390, namely using a named node instead of a blank one for this thing:

                            [
                                acl:origin <https://podpro.dev>;
                                acl:mode
                                acl:Read, acl:Write, acl:Append, acl:Control
                            ].

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

Successfully merging a pull request may close this issue.

2 participants