[Silva-general] nested list, how?
Andy Altepeter
aaltepet at altepeter.net
Tue Apr 7 04:40:44 CEST 2009
Hi Marc,
Thanks for the html view. This took me a while to track down. The short of
it is this is an edge case that was apparently intentional (at least on the
kupu transforms side). This is what happened when a list B was an immediate
sibling of list A when the doc was saved:
A new list item was created, with two elements inside it, a <br /> and list B
This new list item was appended to list A.
The silvaxml shows this. However, when the document was loaded in kupu again,
this new list item was removed, and list B was placed as a direct child of
list a again.
The bare <br /> is causing the problems in the public widgets renderer. The
widgets renderer doesn't know how to render this, so it raises an exception.
These br tags are normally inside <p> tags.
In the Silva 2.1 branch and the trunk, I've removed the code that added the
<br />. So now when the doc is saved, the new list item contains only list
B.
I played a bit with inserting <p><br /></p> or even <p> <br /></p>, but
in another part of the transforms "empty" paragraphs are stripped. It would
have been nice to insert something like this, as it is then possible to
cleanup the middle list in your example without resorting to the html view.
Regards,
Andy
inside a list is that theOn Monday 09 March 2009 05:42:19 pm Marc Petitmermet
wrote:
> On 08. Mrz 2009, at 03:37 Uhr, Andy Altepeter wrote:
> > HI Marc,
> >
> >> i downloaded Silva-2.1.2-all.tgz (buildout stable.cfg is not up-to-
> >> date yet) and i needed to clear the firefox cache because the smi
> >> looked and behaved odd: e.g. the forms editor did not work properly
> >> and the "publish now" button was above the "kupu editor" and "forms
> >> editor" button on the left side (something kit would never allow;-)
> >>
> >> anyway, nested lists work now. although... when you tab/intend twice
> >> you get an error in preview:
> >>
> >> Error Type: AttributeError
> >> Error Value: service_sub_previewer: no widget registered for node
> >> name br
> >>
> >> i stumbled upon this only by accident.
> >
> > Odd, I'm unable to replace this. Could you send a zexp of the
> > document, or
> > perhaps try to replicate it yourself?
>
> this is the html view:
> <h2 silva_id="a" silva_origin="silva_document">a</h2>
> <ul type="disc"><li>
> <p class="normal">a</p></li><li>
> <p class="normal">b</p></li>
> <ul type="disc">
> <ul type="disc"><li>c</li><li>d</li></ul><li>
> <p class="normal">e</p></li></ul><li>
> <p class="normal">f</p></li><li>
> <p class="normal">g</p></li></ul>
>
> you can grab the zexp from here:
> http://silva.mine.ch/b_export_2009-03-08.zip
>
> >> another small error in Silva-2.1.2: get_silva_software_version()
> >> returns "2.1" instead of "2.1.2". therefore, the page edit/globals/
> >> reference reports not the correct version.
> >
> > Hmmm. I think get_silva_software_version is supposed to return only
> > the
> > major.minor release, and not include the bugfix number (or whatever
> > it's
> > called, 'minor-minor'?). Perhaps the copyright.pt and reference.pt
> > should
> > be adjusted to use the contents of 'version.txt', and not the official
> > software version. Kit? I feel like there may already be a
> > launchpad bug
> > report on standardizing this...
>
> it is really very convenient and very fast to verify the silva version
> using the reference.pt.
>
> >>> The kupu popup formulator field is sweet!! I can envision so many
> >>> useful
> >>> things.
> >>
> >> SilvaExternalSources still does not work for me in the developer
> >> buildout (https://bugs.edge.launchpad.net/silva/+bug/321055).
> >
> > That's because this bug was identified and fixed after the last
> > Silva 2.2 tag,
> > which is 2.2a2. 2.2b1 is as of yet unreleased. If you instead use
> > the
> > silva-development.cfg profile, you'll get the silva trunk, and the
> > external
> > sources tool should work.
>
> thanks for the hint. until now i've only been using buildout with
> stable.cfg and development.cfg.
>
> regards,
> marc
>
>
> _______________________________________________
> silva-general mailing list
> silva-general at lists.infrae.com
> https://lists.infrae.com/mailman/listinfo/silva-general
More information about the silva-general
mailing list