Tuesday, November 13, 2012

First Issue Fixed - Return to Profile

The easiest issue, which is bringing users back to their profile page after they upload a project, was fixed by simply changing the link in uploaded.mako.

Next Issue - Edit Description

While I was looking for a way to implement users changing their descriptions, I stumbled across some dormant code that is supposed to do it ! At the high level, it shows the user a text input window above the description in the single project display page, with a save button to change the description. It also worked ! (after I changed the python if statement that controls it to use newer information).

One Step Forward, Two Steps Back

While those issues are fixed on my local install, some things are still rather funny. There are two new issues that have shown up:

1. Java applet loads... sometimes

I'm not sure how to determine when and why the Java applet loads successfully. Its only loaded once after I visited the page that hosts the CSDTs. Still, this is probably affected by issue #2.

Update: the non-loading was just caused by my project files being erased when I reinstall the website Python egg. It works fine with a newly uploaded project.

2. MySQLdb: you can't run this command now

There was an error in the server's MySQL calls along these lines:

ProgrammingError: (2014, "Commands out of sync; you can't run this command now")

Googling this showed me several possible causes, and I think this one applies to my case:
http://stackoverflow.com/questions/11583083/python-commands-out-of-sync-you-cant-run-this-command-now
It seems our custom class database.py does not close the cursor.
Yep, after changing the database class to close the cursor I don't see this error anymore.

Summary

3 issues were fixed: returning to profile after upload, editing of project descriptions, database cursor closing.

What Now?

I should push these changes to the servers ASAP, will discuss the best method for this. I would ideally like the servers to checkout and update from SVN directly. Already I know that the code on the servers has changes not in SVN.

No comments:

Post a Comment