Last modified: 2010-07-14 13:39:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26340, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24340 - Multiple instance templates - large gaps between instances
Multiple instance templates - large gaps between instances
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-11 16:45 UTC by Neill Mitchell
Modified: 2010-07-14 13:39 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Neill Mitchell 2010-07-11 16:45:39 UTC
Hi.

I'm using multiple-instance templates. Great functionality. But I've 
noticed there are large gaps between the template instances on the resulting page.

Looking at the HTML with Firebug, SF seems to be inserting:
<p>
<br>
</p>
Between each instance.

On screen this translates to a large gap which looks ugly and users have commented on it. The margin can be controlled through the CSS, so a hard coded <p><br></p> is unnecessary.

If the hard coded break could be removed that would be great.

Thanks
Neill.
Comment 1 Yaron Koren 2010-07-11 23:45:13 UTC
Hi,

As noted on the mailing list, this is probably an issue in the template itself - as you probably know, Semantic Forms produces wiki-text, not HTML.
Comment 2 Neill Mitchell 2010-07-12 16:38:07 UTC
Hi Yaron.

Thanks for your reply. 

No, it is definitely not in the template. I'm looking at it in Firebug and the
<p><br></p> seems to be definitely coming from elsewhere. Perhaps the PHP that generates the wiki-text is inserting a <br>?

Cheers
Neill.
Comment 3 Yaron Koren 2010-07-12 16:50:13 UTC
If you look at the wiki-text in the page source, you can see exactly what SF generates. Are there blank lines there between the template calls?
Comment 4 Neill Mitchell 2010-07-13 08:08:04 UTC
Hi Yaron.

If I edit rather than edit with form then there are no <br>'s in the page.

Here's an example:
{{Meeting Minutes Template
|Title=DB Schema meeting
|Attendees=Peter Cowan, Neill Mitchell, Simon Ford,
|Meeting Date=March 1, 2010
|Open={{PAGENAME}}
}}
{{Minute Item
|Minute Item=Started looking at the database schema but it was decided it was too out of date. Agreed to relook at it on Weds.
}}
{{Minute Item
|Minute Item=Fixed session for Weds at PC's to review deal as well as DB schema and enhancements
}}
{{Action Item
|Action=Simon to try and update schema diagram as much as possible for Weds meeting
|Who=Simon Ford,
|Due Date=March 3, 2010
|Action Status=Open
}}
{{Action Item
|Action=Make sure I clean the kitchen
|Who=Peter Cowan,
|Due Date=March 3, 2010
|Action Status=Open
}}

Yet there are large gaps between the Minute Items and Action Items and <p><br></p> in the html. So any idea where are they coming from?

Thanks
Neill.
Comment 5 Yaron Koren 2010-07-13 16:41:22 UTC
This is definitely not a Semantic Forms issue, then; setting to "invalid".
Comment 6 Neill Mitchell 2010-07-14 09:10:47 UTC
Hmm.

Looks like it's because the template has a category directive in it.
[[Category:Actions]]
Not sure there is a way round that.
Comment 7 Neill Mitchell 2010-07-14 09:50:00 UTC
Not [[Category:Actions]]

Sorry to be a pain here, but grep -i finds quite a few <p><br /></p>'s in the code.

I appreciate you are busy, so could you quickly please point me to the code that handles multi-instance templates and I will chase this one down. My PHP skills debug are pretty good now ;) I think it is something around table rendering as the resulting html for a page with two multi-instance templates on looks like this:
<table>
    <tbody>
          <tr>
             table contents
          </tr>
    </tbody>
</table>
<p>
    <br>
</p>
<table>
    <tbody>
          <tr>
             table contents
          </tr>
    </tbody>
</table>
<p>
    <br>
</p>

This only happens with multi-instance templates. Nowhere else. The <p><b></p> has to be coming from somewhere!

Many thanks
Neill.
Comment 8 Neill Mitchell 2010-07-14 12:23:25 UTC
Okay, I've re-created one of these pages manually in a MW page rather than from SF and there are no <p></b></p>'s between the tables. So I don't think it's MW's parser inserting them.

Hope this isn't ticking you off. If it is then drop me an email.

Cheers
Neill.
Comment 9 Yaron Koren 2010-07-14 13:39:55 UTC
This is clearly not a Semantic Forms issue - setting back to "invalid". Please stop abusing Bugzilla; it's not a general discussion forum.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links