Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 17 22:28
    inakijaneiro synchronize #394
  • Oct 17 22:28

    inakijaneiro on #390_carbonldp_ts_docs_engine_integration

    Fix constant description Fix typos on comments and task … Cast constants to their respect… and 1 more (compare)

  • Oct 02 20:47

    roddolf on change-docs

    (compare)

  • Oct 02 20:47
    roddolf review_request_removed #388
  • Oct 02 20:46
    roddolf closed #388
  • Oct 02 20:46
    roddolf commented #388
  • Oct 02 20:30

    mhernandeza on #392_array_from_single_property_is_dirty

    (compare)

  • Oct 02 20:30

    mhernandeza on master

    Fixed considering a change wrap… (compare)

  • Oct 02 20:30
    mhernandeza closed #392
  • Oct 02 20:30
    mhernandeza closed #395
  • Oct 02 18:47
    inakijaneiro synchronize #394
  • Oct 02 18:47

    inakijaneiro on #390_carbonldp_ts_docs_engine_integration

    Remove previous SemanticUI conf… (compare)

  • Oct 02 17:59
    codecov[bot] commented #395
  • Oct 02 17:55
    codecov[bot] commented #395
  • Oct 02 17:55
    roddolf synchronize #395
  • Oct 02 17:55

    roddolf on #392_array_from_single_property_is_dirty

    Prevent objects from being cons… Merge branch 'master' into bugf… Fix changelog message describin… (compare)

  • Oct 01 22:25

    mhernandeza on #391_nullable_properties_are_not_dirty

    (compare)

  • Oct 01 22:25

    mhernandeza on master

    Prevent objects from being cons… (compare)

  • Oct 01 22:25
    mhernandeza closed #393
  • Oct 01 22:25
    mhernandeza closed #391
AlexSerrano22
@AlexSerrano22

Hello, I'm trying to add a type to a document but I'm receiving a 400 error code, Error: The attempt of parsing the request's body failed
this is the request response:

[{"@id":"_:node1c40v47nrx16996","@type":["https://carbonldp.com/ns/v1/platform#ErrorResponse"],"https://carbonldp.com/ns/v1/platform#error":[{"@id":"_:node1c40v47nrx16997"}],"https://carbonldp.com/ns/v1/platform#httpStatusCode":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"400"}],"https://carbonldp.com/ns/v1/platform#requestID":[{"@value":"32b1cdcc-5d3b-4901-9da2-e08b9eb58a60"}]},{"@id":"_:node1c40v47nrx16997","@type":["https://carbonldp.com/ns/v1/platform#Error"],"https://carbonldp.com/ns/v1/platform#errorCode":[{"@value":"0x6970"}],"https://carbonldp.com/ns/v1/platform#errorMessage":[{"@language":"es","@value":"The attempt of parsing the request's body failed"}],"https://carbonldp.com/ns/v1/platform#errorParameters":[{"@id":"_:node1c40v47nrx16998"}]},{"@id":"_:node1c40v47nrx16998","@type":["https://carbonldp.com/ns/v1/platform#Map"],"https://carbonldp.com/ns/v1/platform#entry":[{"@id":"_:node1c40v47nrx16999"},{"@id":"_:node1c40v47nrx17000"},{"@id":"_:node1c40v47nrx17001"}]},{"@id":"_:node1c40v47nrx16999","https://carbonldp.com/ns/v1/platform#key":[{"@value":"column"}],"https://carbonldp.com/ns/v1/platform#value":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"57"}]},{"@id":"_:node1c40v47nrx17000","https://carbonldp.com/ns/v1/platform#key":[{"@value":"parserErrorMessage"}],"https://carbonldp.com/ns/v1/platform#value":[{"@value":"Encountered \" <IRI> \"<http://tms.base22.com/ns#ForecastPerson> \"\" at line 1, column 57.\nWas expecting:\n    \":\" ...\n    "}]},{"@id":"_:node1c40v47nrx17001","https://carbonldp.com/ns/v1/platform#key":[{"@value":"line"}],"https://carbonldp.com/ns/v1/platform#value":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"1"}]}]

and this is my code:

carbon.documents.get("users/").then(( [ user, response ] ) => {
         user.addType("http://tms.base22.com/ns#ForecastPerson");
         return user.save();
      }).then(
        ( [ user, response ] ) => {
          console.log(user);
        }
      ).catch( console.error );

and my request payload is:
Add { <http://carbonldp.webtraining.zone:8083/users/> a <http://tms.base22.com/ns#ForecastPerson>. }.

I saw that the error is because the parser encountered <IRI>, my question is: can't I add a custom type? or which is the format for add a type with the function addType?

Miguel Aragón
@MiguelAraCo
Your code isn't wrong. It seems to be an issue with the platform. What platform version are you running?
AlexSerrano22
@AlexSerrano22
latest, 1.0.0-alpha.7
do you like that open an issue on github?
Miguel Aragón
@MiguelAraCo
AlexSerrano22
@AlexSerrano22
CarbonLDP/carbonldp-platform#7
Miguel Aragón
@MiguelAraCo
Thanks :+1:
Alex Arriaga
@alex-arriaga

Hello, good morning;

Is there any way to mark a property in my schema as optional or not required?

I am receiving this error message: Uncaught (in promise) Error: Schema path "child.mentors.mentees" does not exists. and that is because not all my documents have mentees; I am using the method:

this._carbon.documents.getChildren( "/users/" )
We have tried with required : false and optional: true
"mentees": {
      "@id": "tms:mentee",
      "@type": "@id",
      "@container": "@set",
      "required" : false,
      "optional" : true
    },
Rodolfo Aguirre
@roddolf
Every property is always optional, until you apply a filter on it.
But the error, is throwing because it’s not finding a property in the path mentors.mentees.
Can you provide more information of your query?
Alex Arriaga
@alex-arriaga
It is a regular getChildren call
retrieveResolvedChildren: async function(parentDocumentURL){
    let [ children , response ] = await this._carbon.documents.getChildren( parentDocumentURL );
    return children;
  }
CarbonService.retrieveResolvedChildren('/users/').then((documents) => {
      this.users = documents
      console.log(this.users)
    })
Rodolfo Aguirre
@roddolf
What would be structure of a user?
mentors is a document/fragment?
AlexSerrano22
@AlexSerrano22
Rodolfo Aguirre
@roddolf
An issue has been oppend for this error: #211
Alex Arriaga
@alex-arriaga
:ok:
:)
AlexSerrano22
@AlexSerrano22
@roddolf if it is helpful I detected that this specific user cause the error, http://carbonldp.webtraining.zone:8083/users/3901470279768263919/
Sergio Emir Baidon Carrillo
@sbaidon
Hello guys, I'm trying to get started with the carbon js sdk but I'm having an issue when I'm try to create the platform context
carbon (1).png
that is my code
Screen Shot 2018-01-24 at 3.51.37 PM.png
Screen Shot 2018-01-24 at 3.51.51 PM.png
those are the error messages
AlexSerrano22
@AlexSerrano22
maybe you need to set the url of your platform?
let carbon = new Carbon( "my-carbon-instance.com:8080" );
Margarita Hernandez
@mhernandeza
Hi Sergio, when instatiating a Carbon object you must provide your platform’s url and providing the http protocol is an optional argument.
andynice
@andynice
Are you using this version v1.0.x alpha of the documentation?
Alvaro
@alvaro9210
Make sure you’re reading the documentation for v1.0.x (alpha) since that version is the one with the new features
Sergio Emir Baidon Carrillo
@sbaidon
that was it, I was reading the old documentation
sorry about that :smile:
andynice
@andynice
Also, at the end, there is this section "Putting it all together" it was really helpful. I faced some issues with some examples. If I saw that at the beginning, I could have saved some time :sweat_smile:
Sergio Emir Baidon Carrillo
@sbaidon
I will take a look at it thanks!
Alex Arriaga
@alex-arriaga
Hi @roddolf the fix for the issue “Query error when compacting referenced same level documents #211” worked CarbonLDP/carbonldp-js-sdk#211 thank you
Rodolfo Aguirre
@roddolf
Great, thanks for the response
Miguel Aragón
@MiguelAraCo
@andynice that is a good idea. I've seen that some documentations do that. They present you first what you'll end up with and then explain it piece by piece. We'll consider doing it :smile:
Miguel Aragón
@MiguelAraCo

We've just released a new version of the SDK: 1.0.0-alpha.9. Please update your projects to use it.

This version includes the fix for bug #211 plus other improvements/minor fixes.

Alex Arriaga
@alex-arriaga
Thank you @MiguelAraCo
AlexSerrano22
@AlexSerrano22
Hi guys I open an issue/question #215
Alex Arriaga
@alex-arriaga
There is also this issue CarbonLDP/carbonldp-js-sdk#217 about reading nested documents
AlexSerrano22
@AlexSerrano22

hi guys I have a question: I'm working with getMembers to do a query to a document and his related documents like this:

carbon.documents.getMembers('/skills/',
          _ => _.withType(`${CarbonService.CONTEXT_URL}#Skill`).properties({
            '@id': _.inherit,
            'name': _.inherit,
            'skillLevels': {
              'query': _ => _
                .withType(`${CarbonService.CONTEXT_URL}#SkillLevel`)
                .properties({'name': _.inherit})
                **.orderBy( "name", "ascending" )**
            }
          })

because I want my skill levels to be orderly by his name. but I receive an error properties(...).orderBy is not a function but if I change the .orderBy to the first .properties this works, but how can I indicate that I want my skill levels to be orderly on this level e.g:

carbon.documents.getMembers('/skills/',
          _ => _.withType(`${CarbonService.CONTEXT_URL}#Skill`).properties({
            '@id': _.inherit,
            'name': _.inherit,
            'skillLevels': {
              'query': _ => _
                .withType(`${CarbonService.CONTEXT_URL}#SkillLevel`)
                .properties({'name': _.inherit})
            }
          }).orderBy("skillLevels", "ascending" ))

I will open an issue/question on github btw

thanks

#218
Rodolfo Aguirre
@roddolf
@AlexSerrano22 As you have notice, the order function is only avialable in the first level.
Sub-properties do not support ordering, you would need to do it in the client.
AlexSerrano22
@AlexSerrano22
ok thanks rodo, I thought that maybe we can do it with some extra parameter or something. but thanks
Miguel Aragón
@MiguelAraCo
We just released a new version of the SDK that fixes a couple of issues: v1.0.0-alpha.10. Please update if you are using the ALPHA line
Alex Arriaga
@alex-arriaga
Hello guys, just for further reference the issue with the ReferenceError: global is not defined for Angular 7.x-based app is solved by following this instruction, as described in this issue CarbonLDP/carbonldp-js-sdk#327:
// Add the following line to polyfills.ts will fix the problem:
// Add global to window, assigning the value of window itself.
(window as any).global = window;
Alex Arriaga
@alex-arriaga
Hello Carbon LDP team, I was setting up a fresh React application with latest version of create-react-app with TypeScript , however I am getting this error when trying to import CarbonLDP package: CarbonLDP/carbonldp-js-sdk#335
RangeError: Maximum call stack size exceeded
    at resolveNameHelper (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:31831:35)
    at resolveName (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:31829:20)
    at resolveEntityName (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:32680:26)
    at resolveTypeReferenceName (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:38485:20)
    at getTypeFromTypeReference (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:38670:30)
    at getTypeFromTypeNode (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:40178:28)
    at getConstraintFromTypeParameter (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:38328:72)
    at fillMissingTypeArguments (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:37877:49)
    at getTypeFromClassOrInterfaceReference (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:38429:78)
    at getTypeReferenceTypeWorker (/Users/alex/Sites/projects/carbonldp-demo-app/node_modules/typescript/lib/typescript.js:38559:24)
RangeError: Maximum call stack size exceeded
I built a minimal example reproducing this error in this git repository: https://github.com/webtraining-zone/carbonldp-demo-app
Alex Arriaga
@alex-arriaga

FYI:

I have to use "typescript": "3.1.6" and...
The configuration with "lib": ["es5", "es2015", "dom"] and strict to false, here is my tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "allowJs": true,
    "skipLibCheck": false,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "preserve",
    "lib": ["es5", "es2015", "dom"]
  },
  "include": [
    "src"
  ]
}