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

deleteDocument() : Error : Statement to be removed is not on store #631

Open
bourgeoa opened this issue Jan 15, 2024 · 3 comments · Fixed by #633
Open

deleteDocument() : Error : Statement to be removed is not on store #631

bourgeoa opened this issue Jan 15, 2024 · 3 comments · Fixed by #633
Assignees
Labels

Comments

@bourgeoa
Copy link
Contributor

bourgeoa commented Jan 15, 2024

For example trying to edit with the source-pane https://bourgeoa.solidcommunity.net:8443/public/

Statement to be removed is not on store: _:n185 <http://www.w3.org/2007/ont/link#status> _:186 .

_:186 object is the term.value of Collection

The issue occurs only at the st.object being an (object) Collection in the metadata status part.
It looks like if st.object do not get the Collection elements.

removeMatches() calls removeMany() that calls remove() that fails on that object Collection.

@bourgeoa bourgeoa linked a pull request Feb 4, 2024 that will close this issue
@bourgeoa
Copy link
Contributor Author

This must be better explained :
This is the serialization of the metadata for https://bob.localhost:8443/profile/card

    @prefix : <#>.
    @prefix http: <http://www.w3.org/2007/ont/http#>.
    @prefix httph: <http://www.w3.org/2007/ont/httph#>.
    @prefix tabont: <http://www.w3.org/2007/ont/link#>.
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
    @prefix pro: <https://bob.localhost:8443/profile/>.
    @prefix tur: <http://www.w3.org/ns/iana/media-types/text/turtle#>.
    
    pro:card a tabont:Document, tabont:RDFDocument, tur:Resource.
    [
      rdfs:label "[0:16:34]  Request for https://bob.localhost:8443/profile/card";
      tabont:requestedURI "https://bob.localhost:8443/profile/card";
      tabont:response
              [
                  http:status 200;
                  http:statusText "OK";
                  httph:accept-patch
                      "text/n3, application/sparql-update, application/sparql-update-single-match";
                  httph:accept-post "*/*";
                  httph:accept-put "*/*";
                  httph:access-control-allow-credentials "true";
                  httph:access-control-expose-headers
                      "Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Accept-Put, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By";
                  httph:allow "OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE";
                  httph:connection "keep-alive";
                  httph:content-type "text/turtle";
                  httph:date "Thu, 08 Feb 2024 23:16:35 GMT";
                  httph:keep-alive "timeout=5";
                  httph:link
                    '<card.acl>; rel=\"acl\", <card.meta>; rel=\"describedBy\", <http://www.w3.org/ns/ldp#Resource>; rel=\"type\"';
                  httph:ms-author-via "SPARQL";
                  httph:transfer-encoding "chunked";
                  httph:updates-via "wss://bob.localhost:8443";
                  httph:vary "Accept, Authorization, Origin";
                  httph:wac-allow 'user=\"read write append control\",public=\"read\"';
                  httph:x-powered-by "solid-server/5.7.9-beta"
              ];
      tabont:status
              ( "[0:16:35.259] N3 parsed: 13 triples in 26 lines."
              "[0:16:35.259] Done." )
  ].

The issue is with the last object Collection

  [
     .......
     tabont:status
              ( "[0:16:35.259] N3 parsed: 13 triples in 26 lines."
              "[0:16:35.259] Done." )
  ].

@bourgeoa bourgeoa changed the title Delete document : Error can't delete triple in store Delete document : Error : Statement to be removed is not on store Feb 10, 2024
@bourgeoa bourgeoa changed the title Delete document : Error : Statement to be removed is not on store deleteDocument() : Error : Statement to be removed is not on store Feb 10, 2024
@bourgeoa
Copy link
Contributor Author

bourgeoa commented Feb 10, 2024

@angelo @timbl
I have prepared 2 working solutions (tested on NSS)

@bourgeoa
Copy link
Contributor Author

bourgeoa commented Mar 25, 2024

@timbl
The collection issue on store.removeMetadata() is not resolved
One way to HACK the issue is to replace the status collection with simple triples

A hack has been implemented in source-pane to move the error to a console.log()

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

Successfully merging a pull request may close this issue.

1 participant