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.
Every time I load admin/workbench page I get an error:
Type: filter
Severity: alert
Message: Missing text format: 1.
Does this happen for anyone else? What could be the cause?
Comment | File | Size | Author |
---|---|---|---|
#23 | workbench-text_format_error-1335724-23.patch | 2.81 KB | drupalmonkey |
#14 | workbench-missingtextformat-1335724-14.patch | 2.4 KB | Anonymous (not verified) |
#7 | format-1335724-7.patch | 1.69 KB | stevector |
Comments
Comment #1
stevectorAre there any messages in your php error log?
Comment #2
jtwalters CreditAttribution: jtwalters commentedThere is no error in my PHP error log. The only error message I know of is in Drupal's log. I am wondering if it's an incompatibility with another module.
Comment #3
stevectorThat's possible. Are you able reproduce this with other modules off?
Have you deleted or modified any text formats? At least one of these Views references the "plain_text" format.
Also, please switch the status back to "active" when responding.
Comment #4
mxhsubscribing.
Comment #5
stevectorMaxelli, if you are having the same problem please answer the questions in #3. If you just want to follow an issue, please use the "follow" button at the top of the page instead of making a "subscribe" comment.
Comment #6
mxhI'm sorry used the issue feature of this site quite a long time ago.
I have this error in my log, but I didn't change the default text formats.
I had installed Drupal "minimal", not "standard", so I just had "plain text" as input, not the filtered and also not the full html format which comes in the standard installation. Maybe this helps you out.
Greetings
Comment #7
stevectorThanks maxelli. I tried testing with a minimal install. I did not reproduce the error message, however I think I found the problem.
Comment #8
jtwalters CreditAttribution: jtwalters commentedAfter applying patch from #7 and clearing my cache, I no longer receive this error.
Comment #9
pjcdawkins CreditAttribution: pjcdawkins commentedThe patch in #7 did not work for me, I also tried changing line 105:
$handler->display->display_options['empty']['area']['format'] = '1';
to
$handler->display->display_options['empty']['area']['format'] = 'plain_text';
Cleared caches, same error, which occurs once each time I load
admin/workbench
.Comment #10
stevectorPatrick do you have a plain_text format on your site?
Comment #11
Pierco CreditAttribution: Pierco commentedThis patch fix my issue with the v7.x-1.1. Can someone else test this patch and mark this issue TBTC ?
Comment #12
mototribe CreditAttribution: mototribe commentedI have the same error in my drupal logs "Missing text format: 1". However I don't use the workbench module.
Would you mind explaining what the bug was so I can try to hunt down what other module causes this bug?
Comment #13
stevectorAs I understand it, Drupal 7 is inconsistent about keying text formats on ids and machine names. So sometimes they are exported as 1, 2, 3. And sometimes as plain_text, full_text, filtered_text.
I'm sure there is a more complete answer.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch in #7 didn't work for me. Created a new patch (Drupal 7.10, Workbench 7.x-1.1).
Comment #15
prston CreditAttribution: prston commentedPatch #14 didn't work for me (Drupal 7.12, Workbench 7.x-1.1).I have the plain_text format, I cleared the cache...
The strange part is that I've run a grep -R '1' * in the workbench module folder and I didn't find something else related to text formats.After a bit more investigation, I found there is something similar on the workbench_moderation module (file views/workbench_moderation.view.inc, line 117). But correcting it from 1 to plain_text doesn't fix the problem either.Maybe someone have another idea ?Comment #16
prston CreditAttribution: prston commentedOK I got it :P The problem isn't in php files! The problem simply resides in a views (workbench_edited) automatically created when the module is installed. That view contains texts not associated to a specific text format.
How to:
- Edit the workbench_edited view with Views UI. It contains 2 displays: Page and Block.
- In Page: Configure the Global: Text area under Footer. Set the text format to 'Plain text'.
-- Do the same by configuring the Global: Text area under Advanced -> No results behavior.
- In Block: Configure the Global: Text area under Header. Set the text format to 'Plain text'.
-- Do the same by configuring the Global: Text area under Advanced -> No results behavior (normally it's already set, but it's better to check it).
- Save the View.
Note:
I found that fix the problem as there is no more unset references to text formats. This way, there is no need to apply any of the patches proposed in this issue.
Alternative solution:
Disable the workbench_edited view if you don't need it :P
Hope it will help you!
Comment #17
mototribe CreditAttribution: mototribe commentedawesome! Thanks so much, the same problem happened in a default view that come with friendflag!
Comment #18
mikemadison CreditAttribution: mikemadison commentedAs far as I can tell, #16 addresses the problem for me as well. Thanks very much for posting!
Is this something that can be committed back so future versions have the corrected views?
Comment #19
mxhfor me, #16 works as well.
Please take care of it in future releases.
Comment #20
jackalope CreditAttribution: jackalope commented#16 solved the problem for me as well.
Comment #21
drupalmonkey CreditAttribution: drupalmonkey commentedThe patch in #14 works. For those it's not working for, after you apply the patch, make sure the View is not "Database overriding code" and is reverted to "In code". Note: this will undo any other customizations you've done to this view.
stevector: from what i can tell from the filter hook functions and from the filter_format db table, formats should never key on an integer.
If you are still getting this error logged after applying this patch, it's most likely from a different view or module.
Comment #23
drupalmonkey CreditAttribution: drupalmonkey commentedHmm.. rerolled patch against latest git checkout.
Comment #24
Dave ReidI did a recent re-export of all of the Workbench moderation views and noticed a lot of updates are necessary (some starting to peek in on patch #23), so I went ahead and committed only the fixes to 'plain_text' referenced in the view. I filed a new issue to re-export the current default views: #1569698: Re-export default Views.
http://drupalcode.org/project/workbench.git/commit/8969ed2
Comment #26
HyperGlide CreditAttribution: HyperGlide commentedany chance that version 7.x-1.2 can be released with this patch?
Comment #27
Dave ReidYes we'll get a new release shortly.
Comment #28
HyperGlide CreditAttribution: HyperGlide commentedthank you!
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedI tried applying the changes in the patch in #23 but the problem did NOT go away. I have definitely narrowed it down to the 'My Edits' portion as it only occurs when opening My Workbench or My Edits.
Comment #31
hwasem CreditAttribution: hwasem commentedI just installed Workbench last week and have this problem. The solution in #16 fixed it. Thank you so much for posting it, @prston!
Comment #32
gmclelland CreditAttribution: gmclelland commentedFYI... Another followup in Workbench Moderation #2407387: Re-export default view