[prev in list] [next in list] [prev in thread] [next in thread] 

List:       midgard-dev
Subject:    [midgard-dev] Re: [Issue 169]  $nap->get_current_leaf() does not return node id
From:       Torben Nehmer <torben () nehmer ! net>
Date:       2005-01-17 21:04:45
Message-ID: 41EC286D.1040301 () nehmer ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tarjei,

torben@tigris.org wrote:
| ------- Additional comments from torben@tigris.org Mon Jan 17 12:48:14
- -0800 2005 -------
| This is perfectly fine, if you see it in combination with the few
lines of code
| above it:
|
| | $this->_leaves[] = $leaf;
| |
| | if ($currentleaf !== false && $currentleaf == $id)
| |     $this->_currentleaf = count($this->_leaves)-1;
|
| It does add a leaf, checks if it is the current leaf according to the
component,
| and, if yes, sets the internal id of that leaf as the current active one.
|
| That code wasn't changed for over two years, I cannot imageine
something is
| wrong with it.
|
| BTW, regarding the summary: get_current_leaf does never return a node
ID, only
| leaf id's. It might very well be, that there is no active leaf.
|
| If you experience problems with this (I have some vague ideas what
might be
| wrong actually), I would need a more elaborate description of the
problem at
| hand. Especially if you're using dynamic_load on the pages in question.

Note, that I'm fairly sure that this dynamic_load stuff might be a
problem at this point, though it is largly unrelated to the piece of
code you digged out (basicnav is one hell of a class at times ;-)).

I have just commited a fix that should prevent corruption of NAP data
through dynamic_load constructs, as most components use
context-insensitive information to relay active nodes (GLOBALS like
de_linkm_taviewer_activeleaf). This is a bit of a bug on the components
side, but the fix I have commited should work around it.

Would you please test this patch (currently only in CVS HEAD, ask me in
IRC if you need this in branch-2_0, I'll create a patch). If the
corruption still occures (it actually shouldn't), a critical error is
placed into the debug log with a complete NAP object dump that should
make debugging of this easier.

See you at IRC tomorrow.

Live long and Prosper!
Torben Nehmer

- --
Torben Nehmer, Guenzburg, Bavaria, Germany
http://www.nathan-syntronics.de, mailto:torben@nehmer.net
PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB7ChtJPh4Kn6d5FYRAnwUAJ9VCTM65iaZMPLMSH5hO2C36giABACdHb/U
ZM0I3fqEKKy8a2j1uLJijqk=
=3Xh+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@midgard-project.org
For additional commands, e-mail: dev-help@midgard-project.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic