I've created a view that contains a title and an image
The image has been assigned an image style (scale and crop)
The view has been given a page display with menu item and path

Visiting the slideshow through the menu item displays it as expected
Typing in the URL and accessing the page directing results in only the top left area of the image showing
With a width and height roughly the same size as the title

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

Let me check to see if I understand. You have a link in a menu to the view. Let's say the path to the view is http://yoursite.com/myview You click that link and everything's awesome. But if you enter in the url into the address bar then it doesn't work

Do you have a site I can look at? There is no good reason why that would be. That is really strange.

MustangGB’s picture

Status: Postponed (maintainer needs more info) » Active

http://dev2.snowdon.networkltd.co.uk/

Seems width and height are getting incorrectly set for <div id="views_slideshow_cycle_teaser_section_slideshow-page_1">

redndahead’s picture

ok that is one of the weirdest things I have ever seen. So is the homepage set as the url http://dev2.snowdon.networkltd.co.uk/slideshow

MustangGB’s picture

Indeed, however it does it regardless of what the homepage is set to
Are you able to reproduce the issue?

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

Yep really very strange. What browser do you use? I just checked with IE9 and it works fine. When it wasn't working I was using chrome.

edit: and just checked Firefox 3.6 and it's working there too. Maybe Google Chrome only issue?

MustangGB’s picture

I have tested with the following:
- Chromium 10.0.627.0 (70364) fail
- Opera 10.63 (3516) fail
- Safari 5.0.3 (7533.19.4) fail
- Internet Explorer 8.0.7600.16385 fail
- Internet Explorer 9.0.7930.16406 pass
- Firefox 3.6.13 pass
- Firefox 4.0b6 pass

MustangGB’s picture

Status: Postponed (maintainer needs more info) » Active

Whoops forgot to update status

EDIT:

Looking at jquery.cycle.all.js I see this:

// apparently a lot of people use image slideshows without height/width attributes on the images.
// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
var requeue = false;
options.requeueAttempts = options.requeueAttempts || 0;
$slides.each(function() {
  // try to get height/width of each slide
  var $el = $(this);
  this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
  this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
  if ( $el.is('img') ) {
    // sigh..  sniffing, hacking, shrugging...  this crappy hack tries to account for what browsers do when
    // an image is being downloaded and the markup did not include sizing info (height/width attributes);
    // there seems to be some "default" sizes used in this situation
    <-- SNIP -->
  }
  return true;
});

As we are passing slides in as div's (I think?) this magic code doesn't trigger
So the solution is to give width and height parameters to our img's, then the slide size can be calculated correctly

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

Have you tried adding width and height attributes? Does it fix the issue?

MustangGB’s picture

Status: Postponed (maintainer needs more info) » Active

I don't think it's an option yet
theme_image_style() relies on $variables['getsize'] = TRUE to do the legwork
However it looks like theme_image() has removed support for getsize?

EDIT:
#1012416: Image styles don't add width/height attributes

redndahead’s picture

In advanced options try adding slideResize set to 0

Also give me feedback on how easy/hard advanced options is to use.

redndahead’s picture

One thing though is it seems like a browser issue when a link works fine, but going directly to the url doesn't.

redndahead’s picture

Also try unchecking Fixed Height in action advanced options.

MustangGB’s picture

In advanced options try adding slideResize set to 0

Nope, still didn't work without #1012416: Image styles don't add width/height attributes

Also give me feedback on how easy/hard advanced options is to use.

Hmm, it certainly does the job
Once you understand how it works within the module, i.e. dig around in views_slideshow_cycle.js for a bit
And that it's expecting javascript rather than php (not obvious from the help text)
Then it's usable for an intermediate level developer
I can see beginner developers or just regular admins being overwhelmed though
My suggestion would be for each dropdown option have different ways of selecting values
e.g. "backwards" is boolean so show only show "true" and "false" values
e.g. "requeueTimeout" is an integer so call it "Integer value" instead of "Advanced Option Value" and have a text input rather than a textarea
Also having to click "Update Advanced Option" as well as the usual "Update" is pretty user unfriendly and hard to remember

I can give you a small bug for this actually
Go into the Slideshow edit style settings, then click on the "Preview" button in the live preview area
Lots of "Update Advanced Option" and "Applied Options" will start appearing

Also try unchecking Fixed Height in action advanced options.

Didn't work either

redndahead’s picture

The advanced options was meant for intermediate to advanced users. But should hopefully be easy enough for anyone to use. I didn't want to use different fields for each one, because it makes it take a long time for the settings page to load. I was hoping that a text area would be able to handle any type of options necessary and wouldn't be too confusing. But I'm open to suggestions on how to create a happy medium.

Update advanced option was a necessary evil. There is only one actual box that contains all the settings. It is a hidden text area. I'm not sure of another way to allow the data to be entered and still be saved. Maybe a more explicit noticeable save thing.

Can you open a new issue for the bug? I'll look at it as soon as I get back to my main computer.

Thanks for testing this out.

redndahead’s picture

Status: Active » Needs review
FileSize
4.33 KB

I will probably end up making this an option, but can you try this patch without a patched version of core and tell me if it fixes your issue?

MustangGB’s picture

In principle this approach should also work
Will test once it goes green
Thanks for your dedication to this issue

redndahead’s picture

There is no green for these patches ;)

Just need testing done.

MustangGB’s picture

I see, should be able to find some time tonight then

redndahead’s picture

Status: Needs review » Fixed
FileSize
6.28 KB

This patch was committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Martin86’s picture

Version: 7.x-3.x-dev » 6.x-2.3
Priority: Normal » Critical
Status: Closed (fixed) » Active

Greet! First of all, I pretty bad use the grammatics and beg pardon. But I shall try greatly to explain the sense of the problem. My site http://xplc.ru On page Home is located slideshow. When visit URL (when decorous cookie) first slide do not show in get fat height. Than problem can be caused?

redndahead’s picture

Status: Active » Closed (fixed)

Please open a new issue. I understand that you have a hard time communicating in english, but can you please explain what your problem is again. I don't quite understand.