How to debug permission issues?

9 views
Skip to first unread message

Paweł Szczęsny

unread,
Sep 18, 2013, 2:37:58 AM9/18/13
to biostar...@googlegroups.com
Hi,

I'm building a website in Polish using BioStar code repository (changes implemented include using WYSIWYG editor [CKEditor] and templates added to editor when user chooses certain post type). Translations are giving me a headache, as a small change in the code results in breaking majority of the site (not sure if it's Django or BioStar specific, but most of the site isn't translatable out of the box - it's only the small subset in implemented in locale), but that's another story. The main issue I have is that voting breaks in random moments and I have no idea how to debug it. Basically I am logged in (normal user, superuser, doesn't matter), I can add and edit posts, but voting gives be 403 (permission) error. Any ideas how to track it down? 

Cheers
PS

Istvan Albert

unread,
Sep 18, 2013, 8:16:15 AM9/18/13
to biostar...@googlegroups.com
Hello Pawel,

translation should take place via the Django translation framework


and examples for that can be seen in:

https://github.com/ialbert/biostar-central/tree/master/main/server/locale

I have created a simplistic Hungarian and Chinese version, and I have not encountered many problems other than the tedium of having to mark up words/sentences in the templates (not all places have been yet marked). Importantly though no code modification is necessary so no breakage should occur because of translating, as the words are separated from the programming logic.

Now there are a few sections that are not going through the templating system, some error and acknowledgment messages, those are harder to translate because one needs to translate programatticaly.

If you have the DEBUG flag set to true then the error messages are also displayed in the console. 403 is an unusual error that indicates some sort of permission that might also depend on some of your customization.

The words "voting breaks" is not that helpful, you should describe the problem so that it may indicate more detail on the setup and usage. Probably the best is to create a GitHub issue for this problem, that's the best way to troubleshoot errors.






--
You received this message because you are subscribed to the Google Groups "biostar-central" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biostar-centr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Istvan Albert
Associate Professor, Bioinformatics
Pennsylvania State University
http://www.personal.psu.edu/iua1/

Paweł Szczęsny

unread,
Sep 23, 2013, 3:00:36 AM9/23/13
to biostar...@googlegroups.com
Hi Istvan, 

I'm aware of Django translation framework, but BioStar structure is much more complex, as you have acknowledged (for example, the post types are hard to translate). But it seems it's not directly related to the issue I am having.

The story looks as follows: certain portions of python files are changed (no translations of hard parts yet, only settings.py, models.py, etc.). Everything works fine. However, after translation and replacing Markdown-flavoured editor with CKeditor, an attempt to vote gives me 403 (unable to submit vote), but I have no response on the Django side. Anyway, the issue has been submitted and diff file provided.

Thanks!
PS

Reply all
Reply to author
Forward
0 new messages