Setup:

I have all of the most recent modules installed, doing the advanced slideshow installation walk-thru, getting the gray box in my slideshow block.

Using the advanced slideshow tutorial, I successfully created the content type (by import), I created 4 sample nodes, I created the view (by import), I tweaked the "fid" setting in the preprocessor function (which fixed the title/teaser elements - it was just the article title with a closing tag), the pagination works, the "read more" works, and the nodes themselves show up fine when clicked-to; the transitions are spot on, but the images remain gray. Through firebug, I was able to temporarily code the url right to one of the images...and it worked. This tells me it's a path issue.

Issue/question:

I've seen a number of comments and replies in other issue queues that refer to the "image folder settings" in the ddblock configuration form...but I've gone through every nook and cranny of the ddblock settings AND the configuration options for my specific instance and I don't see any "folder settings"...or "image path settings"...nothing like that at all.

The closest thing to a path setting I can find is in the actual content type's "Display Fields" > Image - Configuration > Path setting. My settings in Admin > Site Config > File Settings is the default "sites/default/files" and my Path setting for the imagefield...well...I've tried just "ddblock"...and "images/ddblock"...and I've manually made sure those items were there. Still gray.

I've also created an original content type with an imagefield and it worked fine. The problem does not seem to be a filefield or imagefield problem.

I cannot change my File Settings just to suit the ddblock alone (there are 27 departments contributing content each with their own folders in the files folder, therefore, I can't set the default for my entire site to go to a ddblock folder).

I would be happy to provide any code copy needed; but I cannot provide external access to view the site at this time.

If able, please advise.

versions:
D6.10
cck = 6.x-2.2
filefield = 6.x-3.0
imagefield = 6.x-3.0
imageapi 6.x-1.6
not using imagecache
ddblock 6.x-1.0-rc6
views 6.x-2.5

permissions:
content_permissions module
view field_image (anonymous, authenticated)
view field_pager_item_text (same)
view field_slide_text (same)
ddblock_module
view dynamic display blocks (same)

Comments

Korinvall’s picture

I'd simply like to add that I really love this module. I did have it working on a dev box and things didn't get hairy for me until I updated all of the modules. But even so, I think this is one of the best visually appealing interface modules of all the contribs out there. Just a wonderful combination of cck-views-jquery I've seen. I think it's also an excellent teaching tool for learning how cck and views interact. Anyhow...back to the gray boxes...

Korinvall’s picture

I've done the preprocessor 'fid' line replacements with multiple variants (taken from different support request comments).

The default that came with the zip file: node_data_field_image_field_image_fid
EFFECT: gray box instead of images, slider text is there, but the name of the title shows up in the gray box like this..." [articletitle] />" , everything else works

I changed them to: node_date_field_pager_item_text_field_image_fid
EFFECT: removes that piece of the node title, everything else remains the same

I changed them to: node_data_field_slide_text_field_image_fid
EFFECT: takes me back to the first effect (adds the article title with the closing tag).

Maybe a more practical question for me to ask is....how do you find out what that line should be if the default setting isn't correct? can I get it from uncommenting the debug lines?

[apologies for so many comments on my own post, but I just don't want to waste anyone's time...and I want to be specific]

Korinvall’s picture

debug lines:

#

array (
  'delta' => '4',
  'output_type' => 'view_fields',
  'pager' => 'custom-pager',
  'pager_container' => NULL,
  'pager_event' => NULL,
  'pager_height' => 63,
  'pager_width' => 195,
  'imgcache_pager_item' => '',
  'pager_position' => 'top',
  'template' => 'upright30',
  'custom_template' => NULL,
  'view_name' => 'news_items',
)

#

stdClass::__set_state(array(
   'nid' => '1111',
   'node_title' => 'Article 1',
   'node_data_field_pager_item_text_field_pager_item_text_value' => 'Leaders in Learning',
   'node_type' => 'ddblock_news_item',
   'node_vid' => '9251',
   'node_data_field_pager_item_text_field_slide_text_value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
   'node_data_field_pager_item_text_field_image_fid' => '1561',
   'node_data_field_pager_item_text_field_image_list' => '1',
   'node_data_field_pager_item_text_field_image_data' => 'a:3:{[removed attributes for clarity]}',
   'node_revisions_body' => 'Lorem ipsum...Praesent mollis ipsum. ',
   'node_revisions_format' => '2',
   'node_created' => '1240512421',
))

#

'news_items'

#

stdClass::__set_state(array(
   'nid' => '1111',
   'node_title' => 'Article 1',
   'node_data_field_pager_item_text_field_pager_item_text_value' => 'Leaders in Learning',
   'node_type' => 'ddblock_news_item',
   'node_vid' => '9251',
   'node_data_field_pager_item_text_field_slide_text_value' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
   'node_data_field_pager_item_text_field_image_fid' => '1561',
   'node_data_field_pager_item_text_field_image_list' => '1',
   'node_data_field_pager_item_text_field_image_data' => 'a:3:{[removed attributes for clarity]}',
   'node_revisions_body' => 'Lorem ipsum...Praesent mollis ipsum. ',
   'node_revisions_format' => '2',
   'node_created' => '1240512421',
))
Korinvall’s picture

preprocessor functions:

function murmansk_preprocess_ddblock_cycle_block_content(&$vars) {
  if ($vars['output_type'] == 'view_fields') {
    $content = array();

    if ($vars['settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add slide_image variable 
          if (isset($result->node_data_field_slide_text_field_image_fid)) {
            // get image id
            $fid = $result->node_data_field_slide_text_field_image_fid;
            // get path to image
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
              $slider_items[$key1]['slide_image'] = 
              theme('imagecache', 
                    $vars['imgcache_slide'], 
                    $filepath,
                    $result->node_title);
            }
            else {          
              $slider_items[$key1]['slide_image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . $result->node_title . 
                '"/>';     
            }          
          }
          // add slide_text variable
          if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
            $slider_items[$key1]['slide_text'] =  $result->node_data_field_pager_item_text_field_slide_text_value;
          }
          // add slide_title variable
          if (isset($result->node_title)) {
            $slider_items[$key1]['slide_title'] =  $result->node_title;
          }
          // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] =  l('Read more...', 'node/' . $result->nid);
            $slider_items[$key1]['slide_node'] =  'node/' . $result->nid;
          }
        }
        $vars['slider_items'] = $slider_items;
      }
    }    
  }
}  

function murmansk_preprocess_ddblock_cycle_pager_content(&$vars) {
  if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){
    $content = array();

    if ($vars['pager_settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add pager_item_image variable
          if (isset($result->node_data_field_slide_text_field_image_fid)) {
            $fid = $result->node_data_field_slide_text_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && 
                is_array(imagecache_presets()) && 
                $vars['imgcache_pager_item'] <> '<none>'){
              $pager_items[$key1]['image'] = 
                theme('imagecache', 
                      $vars['pager_settings']['imgcache_pager_item'],              
                      $filepath,
                      $result->node_data_field_pager_item_text_field_pager_item_text_value);
            }
            else {          
              $pager_items[$key1]['image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . $result->node_data_field_pager_item_text_field_pager_item_text_value . 
                '"/>';     
            }          
          }
          // add pager_item _text variable
          if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
            $pager_items[$key1]['text'] =  $result->node_data_field_pager_item_text_field_pager_item_text_value;
          }
        }
      }
      $vars['pager_items'] = $pager_items;
    }
  }    
}

##### I realize that my fid's in the preprocessor and the fid's in the debug lines don't match. But when I do rewrite the preprocessor lines to match the debug code, it just adds the article title over top of the gray-ed out image and it's followed by a closing tag - "/>".

Korinvall’s picture

This is what shows up in the Only local images are allowed. tag for one of the slides (when it's live):
<img alt="Article 3" 100_0636_thumbs512.jpg="" files="" default="" sites="" src="/<img src="/>

Looks to me like a preprocessor issue. But I don't know how to resolve it.

Korinvall’s picture

I changed the fid lines in the second preprocessor function from:

node_data_field_slide_text_field_image_fid

to:

node_data_field_pager_item_text_field_image_fid

but left the first preprocessor function fid's as this:

node_data_field_slide_text_field_image_fid

RESULT: The Only local images are allowed. tag contents displayed in firebug now show this:

<img src="/"/>

It doesn't seem to even by trying to produce the base_path(), $filepath, the alt attribute, or the $result->node_title.

[still working on it...still convinced it's a path issue]

Korinvall’s picture

Component: Miscellaneous » Code
ctalley5’s picture

subscribe... i'm new to trying out this module and it appears to be a path issue to me as well.

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for your detailed posts. This makes it more easy to help you.

(The folder settings are for the basic slideshow, so has nothing to do with the advanced slideshow.)

To find out what the fieldnames have to be in the preprocess functions you can uncomment the drupal_set_message debug lines. As you can see in the debug lines, you need to change the field names for the image field to:

node_data_field_pager_item_text_field_image_fid

I read in your posts you already did this without succes, but that is what it needs to be in the preprocess function.

so your proprocess functions become:

function murmansk_preprocess_ddblock_cycle_block_content(&$vars) {
  if ($vars['output_type'] == 'view_fields') {
    $content = array();

    if ($vars['settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add slide_image variable 
          if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
            // get image id
            $fid = $result->node_data_field_pager_item_text_field_image_fid;
            // get path to image
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
              $slider_items[$key1]['slide_image'] = 
              theme('imagecache', 
                    $vars['imgcache_slide'], 
                    $filepath,
                    $result->node_title);
            }
            else {          
              $slider_items[$key1]['slide_image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . $result->node_title . 
                '"/>';     
            }          
          }
          // add slide_text variable
          if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
            $slider_items[$key1]['slide_text'] =  $result->node_data_field_pager_item_text_field_slide_text_value;
          }
          // add slide_title variable
          if (isset($result->node_title)) {
            $slider_items[$key1]['slide_title'] =  $result->node_title;
          }
          // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] =  l('Read more...', 'node/' . $result->nid);
            $slider_items[$key1]['slide_node'] =  'node/' . $result->nid;
          }
        }
        $vars['slider_items'] = $slider_items;
      }
    }    
  }
}  

function murmansk_preprocess_ddblock_cycle_pager_content(&$vars) {
  if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){
    $content = array();

    if ($vars['pager_settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add pager_item_image variable
          if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
            $fid = $result->node_data_field_pager_item_text_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && 
                is_array(imagecache_presets()) && 
                $vars['imgcache_pager_item'] <> '<none>'){
              $pager_items[$key1]['image'] = 
                theme('imagecache', 
                      $vars['pager_settings']['imgcache_pager_item'],              
                      $filepath,
                      $result->node_data_field_pager_item_text_field_pager_item_text_value);
            }
            else {          
              $pager_items[$key1]['image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . $result->node_data_field_pager_item_text_field_pager_item_text_value . 
                '"/>';     
            }          
          }
          // add pager_item _text variable
          if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
            $pager_items[$key1]['text'] =  $result->node_data_field_pager_item_text_field_pager_item_text_value;
          }
        }
      }
      $vars['pager_items'] = $pager_items;
    }
  }    
}

If this does not help, try first to clear your cache at Administer > Site configuration > Permissions.

If that does not help then it could be a permission issue with .
I saw you enabled the CCK content_permissions submodule and we can concentrate here to solve the issue.

Hope this helps you further, please let me know.

ctalley5’s picture

Worked for me! Thanks!

Korinvall’s picture

@ppblaauw

I'll test the changes tonight. Many thanks.

Whether it works or not, I'll let you know. But either way, I'd like to say I've read almost every support request stream for this module and you're a great example of excellent contributor responsiveness. It's very impressive. Thank you. Keep up the good work!

Korinvall’s picture

@ppblaauw

Sorry to say the problem is still there.

Here's what I did.

1) I replaced my preprocessor code with what you posted above and emptied the cached. Same problem. I also tried running an update just in case. Same problem.
2) So I deleted the nodes, deleted the view, and deleted the content type and re-did the entire thing from the order given in the tutorial (but I left those preprocessor functions you gave in place. Same problem.
3) I removed the only other two jquery-using modules I was using (jquery menus & navigation) and repeated step two. same problem. [I obviously did that to see if there were module conflicts related to jquery. Whether other module conflicts are possible, I'm not sure. I have FCKEditor installed, but it's not enabled because it was interfering with the imagefield upload // I plan to go to wywsiwygAPI-tinymce anyhow.]

Keep in mind, the gray box shows the slide title and text...and my pagers are operating...and the click-through is good to the node (from the "read more" button). But there's a little piece of code that's exposed in the top left corner of the gray box. It's actually the node title of the current respective slide.

I think the only way for me to provide more info is to actually just take the site off of maintenance mode and let you take a look at it. When I do that, I'll post the link here. If you get a chance...take a look and give me some feedback. It's most appreciated.

ppblaauw’s picture

@cacody

I don't understand about the little piece of code.

If you could send a screenshot or the link to the Internet site, that would surely help.
You can send it also on my contact form if you don't want to make it public.

Korinvall’s picture

[email sent to ppblaauw via contact form]

ppblaauw’s picture

It looks like your theme_files are old versions. Can you delete the custom folder from: /sites/all/themes/murmansk/

download the new upright10-50.zip file from http://ddblock.myalbums.biz and copy the custom folder to
/sites/all/themes/murmansk/

Korinvall’s picture

That makes a lot of sense. I never did update those. I'll be able to do it tomorrow morning. I'll respond as soon as it's done.

Thanks!

Korinvall’s picture

It works. Thank you so much!

A brief recap for people with the same problems.

  1. I had the advanced slideshow working.
  2. I updated the following modules: ddblock, filefield, imagefield.
  3. I also overwrote the old preprocessor functions with the new ones supplied on the ddblock maintainer's site: http://ddblock.myalbums.biz/
  4. The images in my ddblock became gray and I assumed there was a path problem - but I was wrong.
  5. In the process of updating the related modules and the preprocessor functions, I didn't think to update the templates (upright10-50, also available on the maintainer's site). As a result, the template I was using (upright30), had mismatching styles in relation to the ddblock module output.
  6. I updated the templates (when you unpack the zipped file you get a file called "custom" and the whole folder should be placed inside in the main directory of your theme...so "sites/all/themes/[themename]/custom). After which, the images appeared just fine. However, I had to make sure to save my old upright 30 stylesheet so that I could match my adjustments to that template. NOTE: it is generally recommended that you simply make a custom template from one of the original templates [instructions on how to do this are on the maintainer's site - see link above]. By not doing that (and instead tweaking one of those templates directly) I made it necessary to do some style matching on my own. Don't do that unless you like extra work.

Many thanks to ppblauw for his rapid attention to this. I'm sure he's a busy guy - this meant a lot to me and my development team. Thanks!!

Korinvall’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
Korinvall’s picture

Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

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