Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
line 308 of sites/all/modules/better_formats/better_formats.module
Comment | File | Size | Author |
---|---|---|---|
#13 | better_formats.932952.13.patch | 2.17 KB | TwoD |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedComment #2
dragonwize CreditAttribution: dragonwize commentedWhat are you trying to accomplish with this patch?
The logic is wrong with your version. This patch would return a boolean value for the format instead of the format id which would break the system.
Comment #3
dragonwize CreditAttribution: dragonwize commentedAnother thing to note is that that line of code is pulled directly from CCK so if it does not work here there is another issue at play.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commented$element['#default_value'][$filter_key] was not set so it is throwing a notice. $filter_key = 'format' in this case. Run with pressflow as it is very verbose in terms of error reporting.
Comment #5
dragonwize CreditAttribution: dragonwize commentedI use Pressflow with all my installs and have never seen this issue. There is more than that involved along with the fact like I said that the patch would not work but only cause more issues and that the code comes directly from CCK I am inclined to mark this as not reproducible.
If you can create some steps to produce off a base site please reopen.
Comment #6
WorldFallz CreditAttribution: WorldFallz commentedi added better_formats to an existing pressflow install and starting having this fill up my watchdog table. afaik, all i did was enable the module, set the permissions, and set a default input format for 1 content type.
@mikeytown2 -- did you ever track this down and resolve it?
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commented@WorldFallz
Pretty sure we use the patch in #1 on production. Give it a try, report back here how it functions for you.
Comment #8
WorldFallz CreditAttribution: WorldFallz commentedthanks for the fast reply mikeytown2 -- patched fixed it for me too and I haven't seen any ill effects yet. Reopening since there seems to be a legit issue here.
Comment #9
kemitix CreditAttribution: kemitix commented#1: I was having the same problem (no default_value for format was available). Your patch fixes it for me.
Thanks
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedComment #11
dragonwize CreditAttribution: dragonwize commentedI still have not been able to reproduce this in any of my installs. As noted above, the patch would create more problems than it solves if the format is not found so I am not inclined to include it without a proper fix for whatever is causing this.
Postponing till the root cause is found.
Comment #12
TwoDI can reproduce this on Drupal 6.33 with Better Formats 1.x-dev if I install BF after adding CCK fields to a node type. At that time
$element['#value']['format']
and$element['#default_value']['format']
aren't set and the notice shows up. Simply saving a field will fix the issue by adding the default value in there. This has to be done once for each field added before BF was installed.Creating a field after Better Formats has been installed does not produce this issue.
Comment #13
TwoDThis patch uses the default format constant if no other value is available (as it would be used anyway), and it fixes another notice which shows up when adding another value to a CCK field.
Comment #14
dragonwize CreditAttribution: dragonwize commented6.x is now unsupported.