ninetydegrees: Drawing: cute piggie waving hello (hi)
[personal profile] ninetydegrees
Hi! I would love to patch the style I've submitted but I don't know if it needs @media $medium_media_query and @media $large_media_query and if so, where to put them exactly. Could someone explain our breakpoint system to me?
purplecat: Programming the Eniac Computer (programming)
[personal profile] purplecat
A while back I tackled a bug in which icons could not have "0" as a keyword. The problems were all caused by the fact that perl treats "0" as false, so a lot of checks for the existence of a keyword on the icon were failing.

Having fixed that particular problem a host of others have been revealed when someone tries to use an icon with a 0 keyword and I've been working through these.

At present, in my dreamhack, it is possible to make a post with a 0-keyword-icon selected and view that post. However if you then try to edit the post the icon gets replaced by the default icon, and if, in the edit page, you attempt to select a 0 keyword icon, it doesn't get attached to the post in the database.

I'm tearing my hair out over this because I can not identify how icon selection differs in the edit form from the post form. The bug appears both using the new and old versions of the post form so I'm assuming it isn't in the javascript or template toolkit and I'm going cross-eyed grepping the codebase.

One of my problems is I'm not even entirely clear where may be a good point to start inserting some "warn" statements, or how to simulate post editing within the test suite.

Any hints, suggestions or pointers much appreciated.
swaldman: A cute fluffy sheep curled up dreaming of Dreamwidth. Labelled "Simon: Bodger". (dw-dev)
[personal profile] swaldman
Does anybody have time to do a quick rundown on how error handling should be done in DW, going forward?

There are a number of different ways of doing things within the codebase at present. I've tended to adopt LJ::throw for new stuff because it seemed comprehensible(!), but Mark has recently said in a review "I... don't think we use LJ::Error anywhere useful anymore. It's pretty old.". (given where the comment was made I assume that it referred to a LJ::throw statement, which I imagine must be part of a LJ::Error package)

So I'm wondering what best practice is now, and thus what we should do in new code?

Thanks
kaberett: Chibi Zuko stands on a tiny rock dinosaur spouting water (zuko-dinosaur)
[personal profile] kaberett
Here is my pull request.

Here is the Bugzilla entry, plus the diff of the draft patch I am building on.

The idea is that we want to add a "User:" line to every support notification e-mail, indicating who was responsible for the activity prompting the notification.

[personal profile] fu pointed out that I need to:
  1. remove the quotation marks around $show_name at line 1068
  2. account for the possibility of $posterid==0 at line 1095

My code as currently in pull request 427 behaves as expected, and as desired except for the issue outlined in point 2.

Removing the quotation marks from line 1068 produces the behaviour that the name of the user who submitted the request is quoted in all subsequent notification e-mails.
  • this persists if quotation marks are added back in.
  • this persists if everything after username => is deleted and rewritten.
  • this behaviour does not persist if line 1095 is replaced with mapping to a static text string, e.g. username => "badgerbadger", and the change is then committed, but does persist if it is instead mapped to e.g. $posterid.
  • this behaviour does not persist if the entirety of any line which has ever contained $show_name (without quotation marks) is deleted or commented out.
  • supportlog in the database is recording the correct information; it's just not making it to e-mail, somehow.


Ideas, please? I am WAY out of my depth here.
purplecat: Hand Drawn picture of a Toy Cat (Default)
[personal profile] purplecat
For a while my dreamhack has been throwing odd errors - e.g.,

file error - tropo-red.tt: not found at /dreamhack/home/8362-purplecat/dw/cgi-bin/DW/Template.pm line 365.\n, referer: http://user3.purplecat.hack.dreamwidth.net/

Today it was behaving very badly, with apache refusing to start and stop correctly, git throwing wierd errors when I tried to update develop and so on. I eventually realised I'd run out of space - deleted my back-up save of my old mercurial repositories and managed to get apache and git behaving again.

However, somewhere along the way I seem to have fubarred the database:


dh-purplecat@newhack:~/dw/bin/upgrading$ ./update-db.pl -r -p --innodb
Updating cluster: 0
Use of uninitialized value in concatenation (.) or string at /dreamhack/home/8362-purplecat/dw/cgi-bin/DBI/Role.pm line 245.
Use of uninitialized value in concatenation (.) or string at /dreamhack/home/8362-purplecat/dw/cgi-bin/DBI/Role.pm line 245.

cluster: status
0: ERROR: Can't connect to the database (clust#0), so I can't update it. (Access denied for user 'dh-purplecat'@'localhost' (using password: NO))

Use of uninitialized value in concatenation (.) or string at /dreamhack/home/8362-purplecat/dw/cgi-bin/DBI/Role.pm line 245.
Use of uninitialized value in concatenation (.) or string at /dreamhack/home/8362-purplecat/dw/cgi-bin/DBI/Role.pm line 245.
Couldn't get master handle for population. at ./update-db.pl line 212.


Any idea what I've done, or how I can fix it?

Or even why I ran out of space - that worries me a bit too.
jjhunter: Drawing of human JJ in ink tinted with blue watercolor; woman wearing glasses with arched eyebrows (JJ inked)
[personal profile] jjhunter
I recently discovered that left-clicking/CTR-clicking in Firefox and selecting 'Inspect Element' opens up all kinds of magic for a baby dev like myself in terms of dynamically exploring a page's source code. What other tools or plug-ins do people use in Firefox, Safari, and/or Chrome for dev-related stuff?
[personal profile] swaldman
Hi all.

I'm thinking of taking on bug 4504 as a longish term project - it's to offer automatic tweeting of new DW posts, which would scratch a personal itch for me.

But, it's a far wider-reaching thing than I've attempted on DW before, and would involve me learning a lot not just on how to do specific things, but on how to approach designing a new feature, IYSWIM.

Is there anybody experienced who'd be willing to do a bit of hand-holding and/or mentoring? I'm generally OK on minutiae, it's likely to be more a case of sanity-checking on overall approaches and answering "where can I find out about this thing". So I don't imagine it would be a huge time investment - especially as I'm kinda short on time myself at present - but it would require a little bit of expanding "do it this way" to "do it this way, and this is why" ;-)

Thanks in advance to anybody with spare time and inclination.

-S

randomling: CJ Cregg and Donna Moss (The West Wing) laugh together. (cj and donna)
[personal profile] randomling
So the new comment preview page, which shows who you are posting the comment as, is working on my 'hack. Yay! That actually fulfills the bug, but there's something else I want to do as part of it for extra functionality, because it occurs to me that you can now see who you're commenting as, but you don't have an easy way to go back and change it apart from the back button.

So, I want to add a More Options button.

Obviously, adding the actual button is Not Very Hard. What is hard is getting this button to actually take you to the reply page - that's mode=reply for top-level comments, or replyto=$commentid for comment replies.

I've been trying to go through various pages (Talk.pm, talkpost_do.bml, talkread.bml) to find out how the regular comments page does it, so I can try to replicate that. But I'm having another "forest of code" problem and I can't trace the code path from the more options button to loading the next page...

Could anyone help me figure out what's going on here so I can reproduce it?

Thanks!
randomling: Tegan Jovanka (of Doctor Who). (tegan)
[personal profile] randomling
Hi guys,

I'm working on bug 4242 - including the poster of the comment in the preview page (helpful for people who might be posting comments as the wrong user, not noticed they're not logged in, wanted to use their OpenID, whatever).

I've managed to display the commenter's username - as long as they're actually a logged-in user of DW. However, anon and OpenID comments break the preview page now, because I haven't figured out how to display anon and OpenID there yet.

I was hoping to take my lead from the actual comments pages of entries, which show them just fine. But while I can find the page that deals with the comments page (/htdocs/talkread.bml) I can't actually find the place where it displays the username. It's a forest of code!

I wonder if anyone could show me the place where that happens? A copy/paste, line number, or thing to search the file for would really help me to get started.

Thanks!

ETA: Look, [staff profile] denise, I asked for help!

Profile

dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

January 2017

S M T W T F S
1234567
891011121314
151617 18192021
22232425262728
293031    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 28th, 2017 05:31 am
Powered by Dreamwidth Studios