Active
Project:
Barcode
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2011 at 14:52 UTC
Updated:
10 Oct 2011 at 12:56 UTC
No barcode gets generated at Preview, therefore it breaks a lot of things, such as print module.
Comments
Comment #1
edxxu commentedI disabled Mollom module, so that Barcode module can generate barcode properly in node preview, so i think there is something wrong with Mollom module.
Comment #2
sunMollom has to enable form caching for a form, which means that the form constructor is only invoked once to build the initial $form structure.
All modules need to be prepared for cached forms in D7, because #ajax enables form caching, too.
In case you have any dynamic information or output in the initial $form structure, then you need to move that code into a callback function that is invoked later in the form processing, and most importantly, invoked for both cached and uncached forms.
Typically, you want to use #pre_render for pure output, or #process or #after_build if you need to change the form structure or access/read other sections in the form to generate the information.