Can someone advise me on how to fix a bug between my site and the pageFlip module. I’ve installed the pageFlip modules and imported the content types forpageflip 6.x-1.0-beta1. Adding pages and chapters is okay. But when I add submit Books, I get the following error message:
warning: Invalid argument supplied for foreach() in /cck/content.module on line 1284.
I thought it might be a missing CCK reference. I imported the content types in this order page, chapter, book. I also installed the Better Formats module (afterwards) because I saw that it was referenced in the page content type code. Please let me know if you have any ideas. For now, the book is not showing at all.
Thanks,
-Ozie
Comments
Comment #1
galis007 commentedFlash viewer requires MegaZine3 -- unpack it into (e.g.) sites/all/libraries/mz3
So ensure u download megazine3 and unpack the contents to the location above
Comment #2
alan d. commentedThis may have something to so with the default value(s) of one or more fields.
The error line is in the function _content_field_invoke_default().
What fields exist for the book content items? Try editing each and saving them (no changes should be required) and trying again. The exported defaults may be causing issues here.
Comment #3
alan d. commentedBig WTF here. There is site specific code to show the non-flash content. The module tries to load content item with id 64 and irrespective of the results, the node or NULL is passed through into page_view(). With no fault of the core system, core starts throwing errors. GIGO
So dropping the define(), adding a admin configurable message & using this instead prevents this error.
The admin option code.
The view code.
Comment #4
jesusns commentedThis work fine:
"patch:
Replace line 1284:
else {
with
else if (count($type['fields'])>0) {"
https://drupal.org/node/716878
Comment #5
adamdicarlo commentedYep, that is a big WTF that I missed when reviewing the module to submit it to contrib.
I'm not so sure about needing to patch CCK. I think once I include the pageflip_content_types feature (yeah, you'll have to install Features if you haven't already) that will help people get up and started much more quickly.
Alan D's work looks like a decent solution (simple text field that optionally can be a nid). I'll be reviewing it soon with the big big patch over in #915878: Combined issue queue patch.
Comment #6
pdemil commentedThanks Alan D! Now I get
"please install flash to view this page.
View this story in the HTML/JavaScript player."
But I can't click on HTML/JavaScript player. Actually, I can't click anywhere in the site, it seems to be frozen.
Comment #7
edwinnur commentedI have try that, but I can't see mz3 viewer.
I just see link HTML/Javascript player. How do I fixed it?
Comment #8
edwinnur commentedNow I can see mz3 viewer but the navigationbar not show and the page resolution can't be zoom
Comment #9
david3000 commentedhello guys :-) any news about this issue? still the same error msg on 6.x-1.0-beta4 module. I don't wanna hacks any module...hope there is a better solution. greetings!
Comment #10
david3000 commentedHello guys, any news about this? The module runs great, but this warning show up every time when I open books. The book opened work fine. It's just the waring message the problem. Any help? thanks
Comment #11
Anonymous (not verified) commentedSame problem here - I'm using 6.x-1.0-beta4. What's the status on this?
Subscribing, please fix soon! Thanks...
Comment #12
adamdicarlo commentedThis is being caused by content_preprocess_node() being passed what looks like the result of node_build_content(NULL) in $vars['node']. Very weird. I'm trying to track it down, now, but I'm wondering if time would be better spent exporting these content types and fields to a features module instead.
Comment #13
adamdicarlo commentedJust committed a fix. I somehow lost track that I had never fixed the bug described by Alan D. in #3. D'oh.
http://drupalcode.org/project/pageflip.git/commit/9ba4165bd0ef1b2e1591ed...
Will follow up to add a new admin interface to specify the default Flash fallback content.
Comment #14
adamdicarlo commentedAdded the admin interface, again by adapting Alan D.'s code a bit:
http://drupalcode.org/project/pageflip.git/commit/f0f3a5a1b87d444f7423a3...