[OPEN-ILS-DEV] 'Now searching' after 1.4 install

Dan Scott denials at gmail.com
Wed Jan 14 10:51:25 EST 2009


2009/1/14 Bill Ott <bott at grpl.org>:
>
> Mike Rylander said the following on 01/14/2009 10:06 AM:
>>
>> On Tue, Jan 13, 2009 at 5:02 PM, Brandon W. Uhlman
>> <brandon.uhlman at bclibrary.ca> wrote:
>>
>>>
>>> Hi, all.
>>>
>>> When I load my shiny new 1.4 OPAC, the 'Now searching' display won't
>>> display
>>> the name of the org unit I'm searching. However, the orgtree selector can
>>> be
>>> chosen and the orgunit names are visible, so it appears that autogen is
>>> working. I thought it might be an i18n where the translated strings were
>>> not
>>> added, so I added a couple to test, re-ran autogen, but it didn't appear
>>> to
>>> make a difference.
>>>
>>> The added wrinkle is that I'm running a fresh 1.4 install, but I pointed
>>> it
>>> at a copy of a 1.2.3.1 dataset [after running 1.2.3-1.4 updates], not a
>>> freshly built 1.4 database.
>>>
>>> There's nothing screaming for attention in the logs, but I'm not sure
>>> what I
>>> should be looking for either.
>>>
>>> Does anybody have some ideas?
>>>
>>
>> Are you seeing any errors in the JavaScript console when selecting an
>> org from the tree widget? (Assuming firefox, obviously.)
>>
>
> I should have reported this earlier, as I'm seeing the same.  Thought it
> might be in our data, but now I'm guessing not.
>
> Nothing interesting in the JavaScript console, but an alert tells me that
> loc.name() is  undefined at line 54 of web/opac/common/js/init.js, when it
> tries to:
> G.ui.common.now_searching.appendChild(text(loc.name()));
>
> loc comes from:
> var loc = findOrgLasso(getLasso());
>
> In looking at my brand spankin' new actor.org_lasso table, I see it's empty.
>
> I'm chasing this backwards to see if PARAM_LASSO and PARAM_LOCATION ever
> meet, but if this rings a bell to anyone before I get there...

That would be coming from the following in
Open-ILS/web/opac/common/js/opac_utils.js:

function orgSelect(id) {
	showCanvas();
	runEvt("common", "locationChanged", id, findOrgDepth(id) );


	var loc = findOrgLasso(getLasso());
	if (!loc) loc = findOrgUnit(id);

	removeChildren(G.ui.common.now_searching);
	G.ui.common.now_searching.appendChild(text(loc.name()));
}

Looks like a problem between the test for the existence of "loc" and
the return value of findOrgLasso (defined in org_utils.js) when
findOrgLasso doesn't really find a match. Good old JavaScript. I'll
put a fix together.

-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list