Re: svn: /phd/trunk/ package.xml phpdotnet/phd/Format.php phpdotnet/phd/Package/PHP/XHTML.php
| From: | Richard Quadling | Date: | Fri, 03 Jun 2011 21:42:42 +0000 |
| Subject: | Re: svn: /phd/trunk/ package.xml phpdotnet/phd/Format.php phpdotnet/phd/Package/PHP/XHTML.php | ||
| References: | 1 2 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-8200@lists.php.net to get a copy of this message | ||
On 3 June 2011 19:07, Hannes Magnusson <hannes.magnusson@gmail.com> wrote:
> On Fri, Jun 3, 2011 at 15:14, Richard Quadling <rquadling@php.net> wrote:
>> rquadling Fri, 03 Jun 2011 13:14:47 +0000
>>
>> Revision:
>> http://svn.php.net/viewvc?view=revision&revision=311770
>>
>> Log:
>> Added Format::getTree() method to allow the current location in the tree to be reportable.
>>
>
>
> Nice, definitely useful for debugging these sort of issues.
> I do wonder if it should be called getDebugTree() so in 5years time
> people don't think it should be used for external packages.
>
> Did you hit the case this happened in phpdoc, or are you experimenting
> with phd outside of phpdoc?
>
> -Hannes
>
Good idea on the name change.
Yes I did find the use case in PHPDoc.
In looking at the phd logs on oti1, I saw that the french one was very
long, compared to the others.
In looking into it, I saw that the image urls were incorrect and that
there was a missing id and one was being created for it.
http://oti1.php.net/logs/phd_fr.log ...
[10:58:41 - E_USER_WARNING ]
C:\pear\phd-trunk\phpdotnet\phd\Package\PHP\XHTML.php:569
Uhm. Can't find an ID for a chunk? - Generating a random one (4de8be61f2844)
But with no idea on what element was missing the id, trying to find it
was difficult.
Having added the a debug locally to the method generating the error, I
found and fixed the issue :
http://svn.php.net/viewvc/phpdoc/fr/trunk/reference/dom/domdocumenttype.xml?r1=311771&r2=311770&pathrev=311771
Having said that, it does seem that the auto generated ID is still
failing as there are subsequent references to the missing ID.
[10:58:41 - E_NOTICE ]
C:\pear\phd-trunk\phpdotnet\phd\Format.php:411
Undefined index: 4de8be61f2844
[10:58:41 - E_NOTICE ]
C:\pear\phd-trunk\phpdotnet\phd\Format.php:416
Undefined index: 4de8be61f2844
[10:58:41 - E_NOTICE ]
C:\pear\phd-trunk\phpdotnet\phd\Format.php:408
Undefined index: 4de8be61f2844
NOTE: The errors/warnings are doubled as the error is generated for
each of the formats - CHM and EnhancedCHM.
I wonder if the format should be included in the error output as there
MAY be errors generated by one format and not another.
Currently, on the surface of things, it would look like there are 2
missing IDs, not one for each format.
There is also a lot of iconv errors in 2 languages (fa and ro). I
think these are real errors, but I don't know these languages in
anyway that would be useful in diagnosing and fixing them.
One thing I'd like to be able to do is to have an error level which
always reports the debug tree for any error, but I don't want to have
to edit every v() call for it.
So, I think that a Format::v() which acts as a proxy should do the
trick here. Replacing v() with $this->v() isn't a great hardship.
Format::v() would determine if the debug errorlevel is enabled and if
so, append the debug tree to the external v() call.
I've not fully thought this out yet (I'm in my beer time at the
moment), but I think there may be issues with this idea as debug tree
call would need the $name and $props params ...
As there is Format::CURRENT_ID, I wonder if there is a CURRENT_NODE
possibility. Something that can be looked at at any time without it
being passed around.
Another option is that all calls to Format::v() would need the $name
and $props arguments.
So Format::v($name, $props, $normal, $v, $parameters, ...,$Errorlevel).
Anyway. Just an idea at the moment.
Have a good evening/weekend.
Richard.
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea