Closed (fixed)
Project:
Dynamic display block
Version:
6.x-1.0-rc6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Aug 2009 at 00:15 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ppblaauw commentedWhen you uncomment the drupal_set_message line in the content preprocess function you can see the fields CCK generates for you CCK fields
The preprocess function is looking for:
Have a look in the result of the drupal_set_message debug line if this is the fieldname generated in your case. If this is not the fieldname you need to change it in the preprocess function.
Hope this helps you further, please let me know.
If you can not find out what the fieldname should be please also attach the result of the drupal_set_message lines. A link to the Internet site would also be helpful
Comment #2
cvaughn13 commentedI have uncommented out the drupal_set_message debug lines; however I am not exactly sure where I should be seeing the debug info. When I return back to the ddblock (which is on my homepage) it runs as normal but without the "Read more..." image. Where should I go to see the debug messages?
Unfortunately, I am on a development server and it is not online - so I can't give you a link.
Thanks for your help.
Comment #3
ppblaauw commentedAfter you uncommented the drupal_set_meessage debug line in the preprocess functions you should reload the page with the ddblock slideshow.
At this page you should see the result of the debug lines.
Comment #4
cvaughn13 commentedAfter I uncomment out the drupal set message lines, none of the debug messages appears on the page with the ddblock slideshow. Is there another way to see the debug lines? I've saved and reloaded the page with no success.
Thanks,
Comment #5
ppblaauw commentedYou can also know the fieldname created by CCK by the following:
A field name generated by CCK will be build up out of three parts
1.) node_data_
2.) field name first field in content type: field_[name of first field]_
3.) field name like: field_[name of field]_value
If your field name for the link to other pages is: url
the generated field_name will be: node_data_field_pager_item_text_field_url_value
You need to replace url with the field-name you use for the link to other pages.
like
Hope this helps you further, please let me know.
Comment #6
cvaughn13 commentedI double-checked and the machine-readable field name is "field_url" Does it make a difference that I am using the modest-grey10p template? I've attached the template files, my css file, and the page source of the page with the slideshow. As you can see, the Read more button is not being printed.
Also, I am not getting the drupal debug messages to show up. I uncomment them set message lines, save the template file, then go back to the page with the slideshow and it doesn't appear. The only difference is that the read more button is gone.
Any other suggestions?
Comment #7
ppblaauw commentedJust to test if the code is used, change:
to
Your readmore button should show up and always link to ddblock.myalbums.biz
Comment #8
cvaughn13 commentedYes, that did work. The "Read more..." button came back on and linked to ddblock.myalbums.biz. Perhaps something is wrong with my view or CCK content type? Should I try to re-create the Url field?
I though perhaps it was a permission issue, but I allowed both anonymous and authenticated users to see the "field_url" values and it still didn't come up.
Any thoughts?
Thank you for all you assistance. Your module is really great.
Best,
Comment #9
ppblaauw commentedok, we know now the code of the preprocess functions in the template.php file is used.
Its still strange that the result of the drupal_set_message lines are not show in the page.
The only issue is: What needs to be the fieldname for your url field?
I assume you added the field to the view.
Can you also see the fieldname fo the URL field in the preview of the view?
Maybe that way we can find out the fieldname.
Comment #10
cvaughn13 commentedhere's the text from the preview on the view. Does this help? I set the Url field to my homepage just to test it.
Title: Hedda Gabler
Pager item text: Hedda Gabler
Url: http://localhost/drupal-6.13/
Slide text:
"one of Raven's best...." - Chicago Tribune
Image:
image/jpeg icon
hedda1.jpg
Body:
Title: Night of the Iguana
Pager item text: A Classic Reborn
Url: http://localhost/drupal-6.13/
Slide text:
Subscribe now and save!
Image:
image/jpeg icon
hedda2.jpg
Body:
Query
SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_pager_item_text.field_pager_item_text_value AS node_data_field_pager_item_text_field_pager_item_text_value,
node.type AS node_type,
node.vid AS node_vid,
node_data_field_url.field_url_value AS node_data_field_url_field_url_value,
node_data_field_pager_item_text.field_slide_text_value AS node_data_field_pager_item_text_field_slide_text_value,
node_data_field_pager_item_text.field_image_fid AS node_data_field_pager_item_text_field_image_fid,
node_data_field_pager_item_text.field_image_list AS node_data_field_pager_item_text_field_image_list,
node_data_field_pager_item_text.field_image_data AS node_data_field_pager_item_text_field_image_data,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format,
node.created AS node_created
FROM node node
LEFT JOIN content_type_ddblock_news_item node_data_field_pager_item_text ON node.vid = node_data_field_pager_item_text.vid
LEFT JOIN content_field_url node_data_field_url ON node.vid = node_data_field_url.vid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
WHERE (node.type in ('ddblock_news_item')) AND (node.status <> 0)
ORDER BY node_created ASC
Title News item slideshow
Path This display has no path.
Query build time 5.03 ms
Query execute time 0.69 ms
View render time 31.1 ms
Comment #11
ppblaauw commentedYes,
The field_name needs to be:
so the code will become:
Comment #12
cvaughn13 commentedYep, that worked! Thank you so very much for your help and patience! Once I get the website published, I'll be sure to add it to the list of websites using ddblock.
Thanks again!
Comment #13
ppblaauw commentedSet status to fixed.
Add tag
Changed Issue Title to make it more useful for other users
Looking forward to the result.