purplecat: Hand Drawn picture of a Toy Cat (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.
purplecat: Hand Drawn picture of a Toy Cat (programming)
[personal profile] purplecat
I've been adding a stickies module to the entry post and edit pages as part of my work on Bug 2152 (multiple stickies). I had this set up so that if the user posts to a community all the sticky options quietly vanished and a little message appeared saying you couldn't sticky entries in communities. Unfortunately, as [personal profile] fu pointed out, administrators can sticky entries in communities.

My problem is I have no idea how to identify a community administrator from jquery.postform.js (which is where I'm controlling this from). Is that possible? If not is there an obvious work around?

If the worst comes to the worst I can always have the message direct people to Organise->Manage Accounts->Display but that wouldn't be optimal.
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?
purplecat: Hand Drawn picture of a Toy Cat (Default)
[personal profile] purplecat
I'm trying to integrate setting a post as a sticky, and multiple stickies into the new entry form.

I've got the form set up to return whether the post should be a sticky and if so which sticky as a value for "sticky_select",

So in DW::Controller::Entry.pm in the function _decode, the value I want comes in as $post->{sticky_select}

That bit works fine.

But I then want to record the value in $req->{props} in order that it can be passed on to _do_post sensibly and the post set as the correct sticky at that point.

If I attempt to put in


$props->{sticky_select} = $post->{sticky_select};


or


$props->{"sticky_select"} = $post->{sticky_select};


or similar I get the error message

Client error: Unknown metadata: sticky_select

So my question is "How do I define metadata?" for use in this object.
[personal profile] swaldman
Hello, I'm new here :-)

I took a look at bug 1424 today, and discovered that it's already been fixed (It was about confusing text, and the text in question has changed since the bug was submitted and is no longer confusing.  Maybe it was a dupe that nobody had spotted, or maybe the confusion was removed while somebody was working on something else).

What should I do with it? If I just add a comment, will somebody appropriate see that comment? I imagine that I shouldn't just mark it Resolved without checking with somebody Important? :-)
purplecat: Hand Drawn picture of a Toy Cat (Default)
[personal profile] purplecat
Me again :/ Still on bug 2152.

I wanted to change some of the labels in the settings for display. I found these in en.dat, changed them, updated the database and everything was working fine. But, all of a sudden, any new changes I make in en.dat don't appear to be getting picked up - this includes resetting everything using patch -R and updating the database* - I'm still getting my new labels turning up rather than the old ones.

What might I have done? (I did have a play with the test suites following some discussion recently and [staff profile] denise (I think) mentioned these can corrupt the database in some way).

I'm using a dreamhack, in case that's relevant.

*stop-apache

$LJHOME/bin/upgrading/update-db.pl -r -p --innodb
$LJHOME/bin/upgrading/update-db.pl -r --cluster=all --innodb
$LJHOME/bin/upgrading/texttool.pl load

start-apache
purplecat: Hand Drawn picture of a Toy Cat (programming)
[personal profile] purplecat
Still working on Bug 2152. The bug involves allowing people to have multiple stickies and the number they can have depends upon their account type. Adding this feature is going to involve a new config setting where someone sets the numbers of stickies allowable for each account type. However I've done the whole protect your configs from updates thing which means the new config settings aren't showing up in the patch files I create.

Should I just document the extra settings needed in the files? especially since the actual numbers associated with each account type aren't particularly important to the code and should probably be decided upon by the powers that be separately from the actual patch? or should I include some default values in the patch and, if so, what is the best way to go about getting these picked up by cvsreport.pl -d?
purplecat: Hand Drawn picture of a Toy Cat (Default)
[personal profile] purplecat
For Bug 2152 I've found I need to create a subroutine that checks whether a form element refers to a valid entry in the user's journal separately from the various subroutines for actually saving it as a sticky.

If a journal entry id can never be zero then this subroutine could return the id number if it is valid and 0 otherwise. In that case the subroutine can replace duplicate code in at least two places, but obviously if an entry can be 0 then the subroutine had better just return 0 or 1.
purplecat: Hand Drawn picture of a Toy Cat (bug)
[personal profile] purplecat
I've picked a second bug to work on (2154) and I've realised there are basically two approaches to fixing it, one involves leaving the current interface as it is and building some (probably simple but potentially ugly) smarts into the code and the other involves getting a bit more info from the user up front.

So this is partly a question about which approach is preferable, but more generally a question about the appropriate place to have this kind of discussion. Should I use the comments in bugzilla, for instance? Similarly were I to pick the route that involved fiddling with the user interface, should screen shots of the potential new interface go into bugzilla for sign off (or review or ???) before a patch file is generated?
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
[personal profile] pauamma
For people using the mq Mercurial plugin in a version that supports multiple queues (I thin Mercurial 1.6 and beyond - check for the qqueue command if you're not sure): Is there a way to have some patches shared between all queues automagically? (Meaning without having to import them manually into each new queue, or to update them everywhere after they were changed somewhere?)
metawidget: A platypus looking pensive. (Default)
[personal profile] metawidget
I'm tweaking some CSS for a site widget, and found myself wondering if we have any conventions dealing with the burning questions of CSS, like absolute versus relative lengths and when it's appropriate to use a table for layout purposes. Is there a guide somewhere, or should we just try to blend with nearby code and make things work any way we can?
blithespirit: (Default)
[personal profile] blithespirit
 Hi folks,
Not sure this is the right place to ask, but I have a friend who is a sys admin with Perl experience who is interested in helping out the Dreamwidth project/community. He mentioned that he has Perl experience, specifically. I have been waxing lyrical about the awesomeness of Dreamwidth & the fact that it helps train its users/community members to be able to work on the code, and got him interested in helping. :)
He said he was interested in maybe helping with Perl mentoring, if that would be of use.
Can anyone help me point him in the right direction - I'd like to show him what needs to be done/the various entry points for helping out, etc. 
Thanks in advance, love your work, etc etc. <3
yvi: Dreamsheep with Replicator pattern (Dreamsheep - Replisheep)
[personal profile] yvi
Heya,

I have been flirting with Bug 1365 - Add support for merging tags for a while (I have about 20 lines of code by now, even ;)) and I'd like to tackle it in detail over the next month. However, I have a bit of a logistical problem: I completely suck at JavaScript. I have this great JS user interface all in my head, but without taking another month to learn JS, this is not going to get written by me. I am pretty confident, though, that I can code the backend for this bug, a non-JS user interface and a very basic JS interface (just another text entry box on http://www.dreamwidth.org/manage/tags with a button next to it that gets activated when you select more than one tag and thus lets you merge two or more tags). So, when I ever get to that point, do I:

a) publish that patch as review? and commit? and open a new bug for a cooler interface
b) publish that patch as review? only and beg others to do the cool JS interface for me, then join the two patches for commit?
c) suck it up and learn JS
d) something else

This is way too early to be asking this, but I wanted to get this out before I forget it again.
yvi: (Dreamwidth - Developer: winter)
[personal profile] yvi
Since [staff profile] denise asked so nicely, I might put up some questions during the next few days.

I apologize if this description is messy - I can be very bad at explaining these things.

One of the bugs I am currently stuck on is http://bugs.dwscoalition.org/show_bug.cgi?id=2012 use a tag list not a tag cloud on the subscription filter interface The goal is to change th tag cloud here: http://www.dreamwidth.org/manage/subscriptions/filters to an alphabetically sorted tag list with usage numbers. Despite my complete inability with javaScript, I managed the 'tag list with usage numbers' part fine. I am, however, stuck on the alphabetically sorted part.

Read more... )

Any ideas?

EDIT: Okay, looks like I either need to sort the ids by name and then return both the hashref and the array and handle that in the JavaScrript portion or sort in htdocs/js/subfilters.js itself. The relevant code is in function cfUpdateTags( data ), the for ( id in data.tags ) { loop would need to be run through in order of data.tags[id].name.
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
[personal profile] ninetydegrees
Development or Project Doc?

To explain: 'maintainer/maintain' is used on several pages on the site e.g. Create Community whereas I think it should say 'administrator/administer' since that's the wording DW uses on community profiles, community management pages and most of its FAQs - I'm not talking about changing it in FAQs here; I've already reported this at dw_docs. But maybe dw_docs is the place for this as well... Or should this be a dw_suggestion first? I'm lost.

A: dw_docs is also for site text changes. Report there.
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
[personal profile] ninetydegrees
First, I apologize for spamming the comm with so many questions you've probably already answered elsewhere.

It seems that, as a result from my patch for bug 1984, the word 'Comments' is missing from View Latest [ 10 25 50 100 ] on Manage Comments. However, it's there on my updated Dreamhack. If I use ?uselang=debug I can see that it's supposed to use .comments, as it should be, which I added to recent_comments.bml.text. Why isn't the word printed? Is there anything I'm missing here? The push happened hours ago so it can't be latency, can it? What did I do wrong? Is this related to Denise's previous post?

See Kareila? That's why I was scared. :/

A: the update script hadn't been run
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
[personal profile] ninetydegrees
So I know how to change a user's capabilities with admin/capedit but how do you create a paid or a seed account or upgrade a free one? I'm asking because some things don't display as a permanent user would see them (in my particular case if was the links on http://www.dreamwidth.org/shop).

A: Go to Admin/Payments.
ninetydegrees: Photo: bingo chips (bingo)
[personal profile] ninetydegrees
I keep finding bugs on Manage Comments. I've already filed three and I could file two more. I'm afraid it's getting a little ridiculous. What's the policy in this case? Should I file the new bugs independently anyway, edit the last one and give it a vaguer title? What?

BTW are there any guidelines somewhere for using Bugzilla? I don't get when it's ok to reopen a bug and when it isn't for example.

A: Reopen when there is a problem with the fix itself: it didn't fix the bug.
cesy: "Cesy" - An old-fashioned quill and ink (Default)
[personal profile] cesy
I have a link, and when you click on it, it calls edit_tagcloud(tagname);.
I then have a function defined:
function edit_tagcloud(newtag)
{
if (! newtag) return;
var cur_taglist = document.getElementById('prop_taglist').value;
if (cur_taglist.length > 0) {
cur_taglist = cur_taglist + ", " + newtag;
} else {
cur_taglist = newtag;
}
document.getElementById('prop_taglist').value = cur_taglist;
}

What I'm aiming for is that tagname is added to the list already in prop_taglist, which is the id for the tags input box. However, the code above doesn't work - nothing happens when I click on the link. Can anyone tell me what I'm doing wrong, or give me any tips on how to debug Javascript like this?

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

September 2022

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
252627282930 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 16th, 2025 12:09 am
Powered by Dreamwidth Studios