To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #504 (closed defect: fixed)

Opened 19 months ago

Last modified 17 months ago

aSlideShowSlot incorrectly outputting height into HTML

Reported by: benlumley Owned by: johnnyoffline
Priority: minor Milestone:
Component: apostrophePlugin Version:
Keywords: Cc:
Symfony version: 1.4

Description

Hi

Just noticed that aSlideShowSlot is inconsistent in its use of the height option ...

I am specifying both a width and a height so that the image is resized, which works fine:

a var_dump looks like:

....
 'width' => int 960
  'height' => int 230
...

However, occasionally (generally on hard refresh) the space the slideshow should occupy was showing collapsed until the image loaded. Looking into this, in modules/aSlideshowSlot/templates/_slideshowItem.php, line 3 is this:

<li class="a-slideshow-image" style="height:<?php echo $options['height'] ?>;<?php echo ($n==0)? 'display:block':'' ?>"><?php echo $embed ?></li>

I think it should be:

<li class="a-slideshow-image" style="height:<?php echo $options['height'] ?>px;<?php echo ($n==0)? 'display:block':'' ?>"><?php echo $embed ?></li>

(added the px after the height is output).

I've tried passing '230px' as a string into to height option, but then resize doesn't work. One way or another, once the px is added, firebug recognises it as valid CSS and the browser renders it full height as expected whilst the image loads.

Change History

Changed 19 months ago by agilbert

  • owner changed from agilbert to johnnyoffline
  • status changed from new to assigned

Changed 17 months ago by johnnyoffline

  • status changed from assigned to closed
  • resolution set to fixed

Fixed [2207]

Thank you

Note: See TracTickets for help on using tickets.