« Posts tagged bug fixing

New on Panmind: the Restricted project

This is the week of features and bug fixing!

We want to start today by introducing a new great feature in Panmind: the “restricted” project!
In the “restricted” project only the members can work together and decide what contents are private and which public.

The owner, and the admin, of the project decides what content can be highlighted in the overview.
For now in the overview is possible to put only a single item that will characterize the project, it will be the ‘showcase’ of the project.

The admin can also decide which elements to include in the “Feautred contents” column situated on the right side of the project.

Users who want to join the project and collaborate can send a request to the owner by clicking the button on the left side under the cover of the project; then the owner will decide whether to accept or not.

The “restricted” project, is designed for those who want to collaborate with their private projects having the possibility to create visibility choosing what to publish and what not as characteristic elements of the project.

What do you think about the name “Restricted” ? Do you like it or can you suggest us another one?

Tell us what you think!

Bug fixing week on Panmind

It has been a tough week at Panmind’s HQ because, after many innovations
and new features released for you, we had to employ some counter measures
for the many, randomic, errors that you were experiencing while using the
platform.

We fixed:

* an error that caused the interface to hang when creating a ReS
contextually to the publishing of a new content
* a validation error that caused inability to publish when copy-pasting
text into the Project writeboards and messages editor
* an error that could happen when an user left the “sign up” page open
for too much time before actually signing up
* a Facebook login bug that prevented you to use it, unless you clicked
very quickly on the Facebook login button .

Moreover, we were challenged by a multi-faceted bug that currently affects
applications using the very same technology stack that we use, Ruby 1.9
and Rails 2.3: the infamousEncoding bug” that appears to the developer
as “Invalid byte sequence in US-ASCII” or “incompatible character encodings”.

For you user, it meant that, randomly, the application could tell you that
“something went wrong”, either in the whole page or via the lousy red box
that we use on Project to report errors. If you experienced this error in
the last month, you are now safe and everything will work as expected.

For the technically inclined, or for other developers facing the same
challenge, we cooked up a monkey patch to ActionView and ERb and a Rack
middleware to brutally close these issues, and while our solution is
not the most elegant or correct, it actually fixes these issues for our
users.

Broadly, the error is caused by the source encoding of Rails 2.3 files,
that miss the “magic comment” that set the encoding thus they default to
the ASCII-8BIT one. Because these sources contain the Strings used by
all _tag helpers in Rails, whenever you try to make them generate an
HTML tag containing UTF-8 characters, you’ll get an Exception because
Strings coded in ASCII-8BIT and UTF-8 cannot be concatenated safely.

Our patch overwrites the 4 core methods in the AV::Helpers::TagHelper
and the two methods in InstanceTag (used by form_for() and friends)
to force the encoding of their returned values to UTF-8.

Moreover, ERB::Util.html_escape (the h()) was overriden as well, by
forcing the encoding to UTF-8 on the string to be escaped, and we also
added a Rack Middleware to recode all the request parameters coming in
from HTTP clients i UTF-8.

As we said, these are brutal solutions for a problem that is properly
fixed by upgrading to the latest versions of the framework (Rails 3) and
the interpreter (Ruby 1.9.2p0), but on a big application like Panmind
this task needs time, and we wanted to fix errors for our users *now*.

The code of our combined patch to Rails 2.3 is available as a GitHub
gist, download it here: https://gist.github.com/669537 – and let us hear
from you in the comments!

Switch to our mobile site