[gogocarto] ERROR 401 Unauthorized and disconnection when trying to modify the colors in Gogocarto #3

Closed
opened 4 years ago by StephanSainleger · 1 comments
Collaborator

When I try to modify the colors in Personnalisation > Style / Couleur / Icônes, after clicking on the button Modify, I get disconnected, with error 401 Unauthorized

https://gogocarto.demo.elabore.coop/admin/gogo/core/configuration-style/1/edit?uniqid=s5f97fb6dbf48a

When I try to modify the colors in *Personnalisation > Style / Couleur / Icônes*, after clicking on the button Modify, I get disconnected, with error 401 Unauthorized https://gogocarto.demo.elabore.coop/admin/gogo/core/configuration-style/1/edit?uniqid=s5f97fb6dbf48a
vlab added the
bug
label 4 years ago
vlab closed this issue 4 years ago
Owner

This was due to a bug in gogocarto: some javascript library (ace editor) would try to download files in js/ace/worker-css.js and another similar one.

In combination with the .htaccess provided, that would try to send targets that would fail in 404 to index.php, it would break the php session. This would actually happen before pressing the modify button. It is on the full load of the page that the php session would be broken.

As a consequence any next page loading would fail.

The fix is to prevent rewriting URL in js/* to index.php by adding this Rule before the final rule in .htaccess:


...
RewriteRule ^js/.* - [L]
...

As a side note, gogocarto dev have chosen to remove the .htaccess as a first reaction as they didn't really understand what was happening, but this would break the nice URL, and generate other very confusing issues.

As a consequence, we are generating a new .htaccess of our own in the charm.

This was due to a bug in `gogocarto`: some javascript library (`ace` editor) would try to download files in `js/ace/worker-css.js` and another similar one. In combination with the `.htaccess` provided, that would try to send targets that would fail in 404 to `index.php`, it would break the php session. This would actually happen before pressing the `modify` button. It is on the full load of the page that the php session would be broken. As a consequence any next page loading would fail. The fix is to prevent rewriting URL in `js/*` to `index.php` by adding this Rule before the final rule in `.htaccess`: ``` ... RewriteRule ^js/.* - [L] ... ``` As a side note, gogocarto dev have chosen to remove the `.htaccess` as a first reaction as they didn't really understand what was happening, but this would break the nice URL, and generate other very confusing issues. As a consequence, we are generating a new `.htaccess` of our own in the charm.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.