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

Error when fetch list of entities from react client #155

Closed
Aragonbn90 opened this issue Aug 2, 2020 · 3 comments
Closed

Error when fetch list of entities from react client #155

Aragonbn90 opened this issue Aug 2, 2020 · 3 comments
Labels
bug Something isn't working v1.2.0 1.2.0 Release label
Milestone

Comments

@Aragonbn90
Copy link
Contributor

Aragonbn90 commented Aug 2, 2020

Describe the bug
With Reactjs as client framework, error when fetch list of entities:
Error: section could not be split on ";"

To Reproduce
Steps to reproduce the behavior:

  1. Login
  2. Click on Entities/YOUR_ENTITY
  3. See error
    Error: section could not be split on ";" at url-utils.ts:24 at Array.forEach (<anonymous>) at push../node_modules/react-jhipster/lib/src/util/url-utils.js.exports.parseHeaderForLinks (url-utils.ts:20) at ./src/main/webapp/app/entities/region/region.reducer.ts.__webpack_exports__.default (region.reducer.ts:72)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Edge chromium

Causion
At server/src/client/header-util.ts:

  • Line 57: res.set('Link', links.join('%2C'));
  • Line 59: <${url}>%3B rel="${relType}"
    We're using "%2C", "%3B" to join.
    But at .../entities/ENTITY.reducer.ts line 72: const links = parseHeaderForLinks(action.payload.headers.link); we're using p.split(';')

Solution
Change '%2C' to ','
Change '%3B' to ';'

@ghost
Copy link

ghost commented Aug 3, 2020

Hi @Aragonbn90 thanks for the issue! You are the best framework tester ;)
So I think that the error is related to the jhipster client side, I will update the version from the actual 6.8.0 to the latest in order to resolve also the entity generator bug.
However, you have found a solution in the server side, but indeed I don't know much about pagination because it is a feature inherited from a jhipster developer contribution, so I don't know what are the link and join with "%2C" or"%3B".

Could you do the fix that you have suggested and test that is all ok also with the angular client? Thanks

@ghost ghost added the bug Something isn't working label Aug 3, 2020
@ghost ghost changed the title Error when fetch list of entities Error when fetch list of entities from react client Aug 3, 2020
@Aragonbn90
Copy link
Contributor Author

Hi @amanganiello90, I will try with this issue. Thank you for your client side suggest.

@ghost ghost closed this as completed in e893d81 Aug 4, 2020
@ghost
Copy link

ghost commented Aug 4, 2020

Thanks, it works!

@ghost ghost self-assigned this Aug 4, 2020
@ghost ghost added this to To do in nodejs blueprint via automation Aug 13, 2020
@ghost ghost added the v1.2.0 1.2.0 Release label label Aug 13, 2020
@ghost ghost moved this from To do to Done in nodejs blueprint Aug 13, 2020
@ghost ghost added this to the 1.2.0 milestone Aug 14, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.2.0 1.2.0 Release label
Projects
Development

No branches or pull requests

1 participant