This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Error on Symfony Website with displaying Snippet

Social code snippet repository

Error on Symfony Website with displaying Snippet

by DrDrakken » Thu Jan 18, 2007 10:03 pm

For some reason, there is a error in the display for the following snippet http://www.symfony-project.com/snippets/snippet/136

As you notice, it does not display like any of the other snippets. Could any of the administrators fix this problem?
Thanks
DrDrakken
Member
 
Posts: 80
Joined: Wed Jan 03, 2007 9:41 pm

Re: Error on Symfony Website with displaying Snippet

by COil » Fri Jan 19, 2007 12:48 pm

It seems to be a problem with your account, it stop at " snippet by ", after it should be the login / name
COil
Faithful Member
 
Posts: 467
Joined: Wed Sep 06, 2006 6:08 pm

Re: Error on Symfony Website with displaying Snippet

by sjohnr » Sat Feb 03, 2007 7:13 am

Snipeet is not bug-free, as you can see. I just experienced your exact same issue. After a few minutes, it came to me why this issue could come up.

After typing my snippet into the textarea, my session had expired. When I hit save, it actually inserted the entire snippet into the database, but since I wasn't logged in, it had no login_id to relate the snippet to. When you go to view the snippet, it dumps the snippet to the screen, but when it goes to display the author's name, it bombs, because there is no author. Since we aren't in the dev environment, we see no error message, and instead see the results of the presentation without any decoration, up until the point where the error occured (which was when the software tried to display the author's name).

Additionally, the software likely displays results (on the homepage and elsewhere) based on the snippet table joined with the login table. Since this particular snippet I just inserted (and your erroneous one as well) don't have a related login_id (author) due to our browser session timing out when we hit save, the list query simply omits them.
sjohnr
Member
 
Posts: 36
Joined: Sun Sep 24, 2006 8:27 pm

Re: Error on Symfony Website with displaying Snippet

by COil » Sat Feb 03, 2007 8:41 pm

:roll:

I suppose there is one test missing... that should not be very hard to had.
COil
Faithful Member
 
Posts: 467
Joined: Wed Sep 06, 2006 6:08 pm

Re: Error on Symfony Website with displaying Snippet

by sjohnr » Mon Feb 05, 2007 6:41 am

I doubt it is much of a priority for the symfony team right now... understandably so. But it definitely would be an easy fix.

Several pages in snipeet ignore records that don't have an author associated. However, a tag under the "snippets/tagged" action doesn't have the aforementioned unintentional but convenient workaround, and so those pages bomb too.

I feel bad that my snippet is making several such pages bomb... Oh well.
sjohnr
Member
 
Posts: 36
Joined: Sun Sep 24, 2006 8:27 pm

Re: Error on Symfony Website with displaying Snippet

by COil » Tue Feb 06, 2007 11:45 am

Feel free to submit a patch. :P
COil
Faithful Member
 
Posts: 467
Joined: Wed Sep 06, 2006 6:08 pm

Re: Error on Symfony Website with displaying Snippet

by n8vo » Fri May 04, 2007 11:03 pm

Ah! I just experienced the same bug. I guess I will resubmit my snip.
User avatar
n8vo
Junior Member
 
Posts: 17
Joined: Fri Mar 23, 2007 12:18 am
Location: Fairbanks, Alaska

Re: Error on Symfony Website with displaying Snippet

by francois » Sat May 05, 2007 9:45 am

That's why I think the coming of symfony forge can benefit a lot to current projects. The snipeet application could be one of the hosted apps in the forge, and the ability to contribute tickets, patches and improvements will allow the application to become better.
francois
Faithful Member
 
Posts: 1638
Joined: Sat Oct 22, 2005 4:56 pm

Re: Error on Symfony Website with displaying Snippet

by sjohnr » Tue May 08, 2007 4:51 pm

Good point. Nothin' but agreement here.
sjohnr
Member
 
Posts: 36
Joined: Sun Sep 24, 2006 8:27 pm