Saving a wiki article bounces back to the edit page

Bug #1605510 reported by GunChleoc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands Website
Fix Released
Undecided
kaputtnik

Bug Description

While trying to add some info to

https://wl.widelands.org/wiki/edit/Building%20Widelands/

I was unable to save the contents - the "Save" button shows the edit window without preview instead, and the content is not saved.

The text I tried to add is:

### !OpenBSD

For latest development version, install the following dependencies:

~~~~
pkg_add boost bzr cmake gcc g++ gettext-tools glew icu4c libexecinfo png sdl2-image sdl2-mixer sdl2-net sdl2-ttf
~~~~

At the time of writing, the default version of GCC is too old to build Widelands, so the gcc packages need to be installed and cmake/make needs to be run manually:
`cmake .. -DCMAKE_C_COMPILER=egcc -DCMAKE_CXX_COMPILER=eg++`

Tags: wiki
Revision history for this message
kaputtnik (franku) wrote :

Currently i couldn't reproduce this locally.... so it must be something different on the server.

kaputtnik (franku)
Changed in widelands-website:
assignee: nobody → kaputtnik (franku)
status: New → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

For whatever reason Django is thinking that the Data in the form is not valid. It's the same behavior as when you mistype your password or username in the login box: You will be redirected to the login form again, and the field with wrong data is marked. But for wiki edit no marker for wrong data is shown... :-(

Sorry that i haven't test this earlier.

Revision history for this message
kaputtnik (franku) wrote :

The main problem is that the request object does not contain the IP-address of the editor (anymore?). I guess that the latest changes to nginx is causing this. I tried a fix but with no success....

Revision history for this message
kaputtnik (franku) wrote :

This is fixed now. I've added the contents GunChleoc wants to the page https://wl.widelands.org/wiki/Building%20Widelands/

Short explanation:
To save an article the users IP-address is (currently) needed. This address is normally stored in the request.META['REMOTE_ADDR'] value, but this value is "None" right now.

The fix was to add the setting "BEHIND_PROXY=True" because with that setting the request.META['HTTP_X_FORWARDED_FOR'] value is used to get the IP. I couldn't find this setting in the previous installation (before the code was updated with django1_8 branch), so i guess some other changes make this setting needed. Maybe an update of other Software causes this.

Some links:
http://stackoverflow.com/questions/34251298/empty-remote-addr-value-in-django-application-when-using-nginx-as-reverse-proxy
https://github.com/python-web-sig/wsgi-ng/issues/11

Changed in widelands-website:
status: Confirmed → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :

I can confirm that this is fixed :)

kaputtnik (franku)
Changed in widelands-website:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.