Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to delete document that is visible in the Workbench #169

Open
codyburleson opened this issue Oct 22, 2018 · 3 comments
Open

Unable to delete document that is visible in the Workbench #169

codyburleson opened this issue Oct 22, 2018 · 3 comments

Comments

@codyburleson
Copy link

Using: Workbench: v5.0.0 / SDK: v5.0.0 / Platform: v5.0.0

I had two documents under posts/ container in the Workbench:

hello-world/
hello-caden/

I created 5 new documents using my own input form: Test Blog Post (1-5).

I deleted hello-world/ using the Workbench.

Now, when I try to delete hello-caden/ using the Workbench, I get the following in the browser console:

DELETE http://localhost:8083/posts/hello-caden/ 404 (Not Found)

And I get this message in the view:

Not Found
The document 'http://localhost:8083/posts/hello-caden/' wasn't found
Status: 404 - Not Found
URI: http://localhost:8083/posts/hello-caden/

Code: 0x7473 -The document 'http://localhost:8083/posts/hello-caden/' wasn't found

The hello-caden/ document is not only showing in the document explorer, but it is also being
returned from my application as shown in the following console log:

(5) [{…}, {…}, {…}, {…}, {…}]
0: {slug: "hello-caden", title: "Hello Caden", $id: "http://localhost:8083/posts/hello-caden/", $repository: {…}, $registry: {…}, …}
1: {slug: "test-blog-post-4", title: "Test Blog Post 4", $id: "http://localhost:8083/posts/test-blog-post-4/", $repository: {…}, $registry: {…}, …}
2: {slug: "test-blog-post-3", title: "Test Blog Post 3", $id: "http://localhost:8083/posts/test-blog-post-3/", $repository: {…}, $registry: {…}, …}
3: {slug: "test-blog-post-2", title: "Test Blog Post 2", $id: "http://localhost:8083/posts/test-blog-post-2/", $repository: {…}, $registry: {…}, …}
4: {slug: "test-blog-post-1", title: "Test Blog Post 1", $id: "http://localhost:8083/posts/test-blog-post-1/", $repository: {…}, $registry: {…}, …}
length: 5
__proto__: Array(0)

This is how my code is generating the above list:

componentWillMount() {
      
      carbonldp.documents.$getMembers( "posts/", _ => _
          .properties( {
              "title": {
                  "@type": "string"
              },
              "slug": {
                  "@type": "string"
              }
          } )
      ).then(  (items) => {
              console.log('Something: %o', items);
              this.setState({items});
          }
      );

  }
@codyburleson
Copy link
Author

I was able to delete the posts/ container from the Workbench, recreate it, and start over. However, trying to reproduce the exact same steps, it seems I was unable to reproduce the issue.

@codyburleson
Copy link
Author

codyburleson commented Nov 21, 2018

I have this issue again now. In the workbench, I have 5 documents showing in the document explorer, but only one of the 5 is actually readable.

workbench-issue-2018-11-21

I'm going to hold on to my current dataset so that maybe we can troubleshoot this issue by using it.

carbonldp.zip

@codyburleson
Copy link
Author

codyburleson commented Nov 21, 2018

Note that if I execute the current workbench from the Workbench code base (npm start), instead of the container, I am able to double-click to open (read) all 5 documents. Hmmm. Yet that's strange because those 4 documents also do not open in my React Blog application. This makes me wonder if it has something to do with the version of the SDK that my blog app and the container version of the Workbench I am using differs from the SDK used by the latest version of the Workbench that's currently in the code base.

When running from the code base, the Workbench reports:

Workbench: v5.0.0 / SDK: v5.0.0 / Platform: v5.0.0

So, then I fired up my Workbench container again and it reports the same:

Workbench: v5.0.0 / SDK: v5.0.0 / Platform: v5.0.0

Interesting thing is... after firing up my workbench container again, now all 5 docs can be opened in that Workbench instance!

So, I fired up my blog app again and, lo and behold, I can open all the documents there too now. So... it's strange. Intermittent. The issue doesn't stick. Is there some kind of caching going on in the platform where, having opened these documents in one way, it somehow fixed how they open from then on?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants