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.
When selecting the Header "Add" option, a pop-up displays "There are no header available to add.", however, the existing header (e.g. Global: Text area) goes into the Configure as expected.
This also happens with the Footer "Add".
The Fields, Filter and Sort "Add" options are functioning as expected.
Comment | File | Size | Author |
---|---|---|---|
#27 | cache_views_20140129-d.o-issue-1955472.sql_.zip | 175.24 KB | jordan8037310 |
#16 | cache_views.sql_.zip | 151.88 KB | andreic |
#16 | Screen Shot 2013-05-30 at 2.49.43 PM.png | 109.44 KB | andreic |
#5 | views-no-header-avail-1955472-4.patch | 676 bytes | ard00d |
#3 | views-no-header-avail-1955472-3.patch | 746 bytes | ard00d |
Comments
Comment #1
joshuaw CreditAttribution: joshuaw commentedI'm also experiencing this issue. Strangely, the fields are available when first creating a new view.
Comment #2
joshuaw CreditAttribution: joshuaw commentedStill happening in 3.7. Previously had jQuery Update. Others had suggested that this was the issue. Tried different versions as well as removing it entirely and using no javascript at all, but headers are still unavailable. This started happening in 3.6.
Comment #3
ard00d CreditAttribution: ard00d commentedThis patch seems to fix things for me
Comment #5
ard00d CreditAttribution: ard00d commentedOk, so my first attempt at submitting a patch here seems to have failed...let me try this again.
Comment #6
ard00d CreditAttribution: ard00d commentedComment #7
gigapatI have this exact same issue. I'm not sure what is causing this. Clicking on Apply button in the Add header dialog box results in a browser screen full of what looks to be javascript.
Comment #8
richard.french CreditAttribution: richard.french commentedI've been unable to re-create this from a fresh install. Has anyone else been able to?
Comment #9
joshuaw CreditAttribution: joshuaw commentedIf you're getting what I'm getting, it's a JSON encoded response, which should be interpreted and displayed, but is just spit out on the screen instead.
Comment #10
joshuaw CreditAttribution: joshuaw commentedMy understanding of this issue has to do with caching, so a new install may not have the view cached yet. I don't have access to my codebase right now, but I think ard00d's patch specifically affects the cache check and resolves this.
Comment #11
gigapatMy issue has come about from upgrading to drupal 7.22 from drupal 7.21. Updated views and views UI to the latest. Everything is up to date.
Comment #12
gerrit1978 CreditAttribution: gerrit1978 commentedI have the same issue, sometimes with header/footer, sometimes with fields or sort criteria to add. Cloning the view solves the problem, but that's not always a solution.
Comment #13
richard.french CreditAttribution: richard.french commentedThe patch submitted by ard00d works. However, running it on our test server, performance seems to suffer greatly when adding headers or footers or fields. It seems to be recursing. This test server has very few modules enabled on it, apart from views and ctools.
Should the table 'cache_views_data' have data inside it? As it is completely empty and is referenced in the code in the cache.inc file. So is data not actually being written to the cache at all?
Using _views_fetch_data() from 3.5 also solves it for me. But this has changed significantly in 3.6/3.7 so I would be wary of submitting this code in a patch.
Comment #14
gerrit1978 CreditAttribution: gerrit1978 commented#13 is the same here. Patch worked but adding or editing fields, saving the view.... goes incredibily slow (literally approx. a minute before the list of fields appear after "Add" has been clicked). But at least the fields (or header/footer) options are available again.
Comment #15
dawehnerThe problem with this patch is that this basically brings back the performance problems, which have been fixed by #1421844: views_fetch_data() cache item can reach over 10mb in size in theory.
It would be cool if someone with this problem could do nothing and export the cache_views table as it is.
For other people clearing the cache could help.
Comment #16
andreic CreditAttribution: andreic commentedHi,
I have attached the cache_views table as it is in my database. I'm currently using Views 3.7 and I'm encountering this issue in Header, Footer and No results behavior, as well.
I also attached a screenshot of how it displays no fields when trying to use one in the "No results behavior" section.
Let me know if I can help further,
Andrei
Comment #17
andreic CreditAttribution: andreic commentedIf I clone the view as #12 suggested, I get to add any field I want again so, Header, Footer and No results behavior sections work as expected ONLY until I save the cloned view. Once saved, I back to the old issue of not being able to add field to those sections.
Furthermore, I am not able to add fields, like a php field or custom view field. Only a bunch of fields are presented as options. Not sure if related.
Comment #18
fluffy CreditAttribution: fluffy commentedI also get javascript error "Uncaught TypeError: Cannot call method 'toLowerCase' of undefined" and the add button stops working.
Edit: I got it working with messing jQuery update, changing versions back and forth and flushing caches.
Comment #19
stephenplatz CreditAttribution: stephenplatz commentedsubscribing same issue(s)
patch in #5 seems to have worked
Comment #20
WigglyKoala CreditAttribution: WigglyKoala commentedI have tried turning off jQuery update and tweaking the jQuery versions and had to luck.
I also confirm that when creating a view it is fine but when updating it isn't possible to add a header and footer. I've got other sites using this same version (and newer) and don't seem to have the problem. So I will investigate further and report any differences.
Comment #21
nramirezsalas CreditAttribution: nramirezsalas commentedHola, en mi caso hice lo siguiente en ( admin/structure/views/settings/advanced ) :
Sé que no es la solución ideal pero luego de agregar el "header" puedo desactivar la casilla de "Disable views data caching" y así lo dejo como estaba. En mi caso me funcionó, saludos.
Comment #22
audealexandre CreditAttribution: audealexandre commentedThe solution in #21 worked for me (views 3.7, authcache + memcache).
Thanks!
Comment #23
sjhuskey CreditAttribution: sjhuskey commented#21 worked for me, too.
Comment #24
TBarina CreditAttribution: TBarina commentedSame problem here.
I'm using 3.7.
Disabling Views data caching it's the only solution so far.
I enable it again after modifying my Views and it seems to work.
Does anybody know if a patch is on the way?
Comment #25
DrCord CreditAttribution: DrCord commentedThe fix in #21 worked for me as well.
Comment #26
Koozer CreditAttribution: Koozer commentedClearing and disabling the cache does not work for me, nor does cloning the view.
Comment #27
jordan8037310 CreditAttribution: jordan8037310 commentedI also have this issue. Views 3.7
Error response:
[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"seven","theme_token":"CfmLd53SlctBrGRdm22aQJJKL_Tq37HdU2iIicQLTJo"},"googleAnalyticsReportsAjaxUrl":"\/google-analytics-reports\/ajax"},"merge":true},{"command":"viewsSetForm","output":"\u003Cform action=\u0022\/admin\/structure\/views\/ajax\/add-item\/weight_tracker\/panel_pane_1\/footer\u0022 method=\u0022post\u0022 id=\u0022views-ui-add-item-form\u0022 accept-charset=\u0022UTF-8\u0022\u003E\u003Cdiv\u003E\u003Cdiv class=\u0022views-override clearfix container-inline\u0022\u003E\u003Cdiv class=\u0022form-item form-type-select form-item-override-dropdown\u0022\u003E\n \u003Clabel for=\u0022edit-override-dropdown\u0022\u003EFor \u003C\/label\u003E\n \u003Cselect id=\u0022edit-override-dropdown\u0022 name=\u0022override[dropdown]\u0022 class=\u0022form-select\u0022\u003E\u003Coption value=\u0022default\u0022\u003EAll displays\u003C\/option\u003E\u003Coption value=\u0022panel_pane_1\u0022\u003EThis panel_pane (override)\u003C\/option\u003E\u003C\/select\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\u003Cdiv class=\u0022scroll form-wrapper\u0022 id=\u0022edit-options\u0022\u003E\u003Cdiv class=\u0022form-item\u0022\u003EThere are no footer available to add.\u003C\/div\u003E\u003C\/div\u003E\u003Cdiv class=\u0022container-inline views-add-form-selected\u0022\u003E\u003Cdiv id=\u0022edit-selected\u0022 class=\u0022form-item form-type-item\u0022\u003E\n \u003Clabel for=\u0022edit-selected\u0022\u003ESelected: \u003C\/label\u003E\n \u003Cdiv class=\u0022views-selected-options\u0022\u003E\u003C\/div\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\u003Cdiv class=\u0022clearfix\u0022\u003E\u003Cdiv class=\u0022form-buttons\u0022\u003E\u003Cinput type=\u0022submit\u0022 id=\u0022edit-submit\u0022 name=\u0022op\u0022 value=\u0022Add and configure footer\u0022 class=\u0022form-submit\u0022 \/\u003E\u003Cinput type=\u0022submit\u0022 id=\u0022edit-cancel\u0022 name=\u0022op\u0022 value=\u0022Cancel\u0022 class=\u0022form-submit\u0022 \/\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cinput type=\u0022hidden\u0022 name=\u0022form_build_id\u0022 value=\u0022form-IvC0MYlZ5MEm3IGolPtRkTiBrKmf5SyqGQAXcJ0ZIqQ\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_token\u0022 value=\u0022BoSJR12vPRIPCOLBR-tXXpxfGJ_1ulhnwKdD9hdWYuM\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_id\u0022 value=\u0022views_ui_add_item_form\u0022 \/\u003E\n\u003C\/div\u003E\u003C\/form\u003E","title":"Add footer","url":"http:\/\/testsite.com\/admin\/structure\/views\/ajax\/add-item\/weight_tracker\/panel_pane_1\/footer"},{"command":"viewsHilite","selector":".panel-pane-1add-item"}]
Disabling Views Caching temporarily fixed this issue for me.
Comment #28
WigglyKoala CreditAttribution: WigglyKoala commentedDisabling Views cache has also worked for me too
Comment #29
nikathone#21 worked for me as well. Approximate English translation
Comment #30
abrlam CreditAttribution: abrlam commented#21 worked for me as well.
Views 7.x-3.7
jQuery update 1.7
memcache enabled
Has anyone tried to re-create the issue in 3.8?
Comment #31
wer0ckz CreditAttribution: wer0ckz commented#21 works! Thanks
Comment #32
leoklein CreditAttribution: leoklein commented#21/#29 works. Mucho thankyou's!
Comment #33
kjala CreditAttribution: kjala commented#21/#29 seems to be the solution for the moment. I had to clear the cache first and then disable the views caching and saved the configuration to make it work. Here are my sequence of steps.
go to admin / structure / views / settings / advanced
1. Click on "Clear Views' cache"
2. check the box "Disable views data caching" and click on "Save configuration"
3. refresh or go to the view you were editing
4. Add the field to the "header" or "footer" and save the view.
you can go back and uncheck the "Disable views data caching" and save the configuration.
Comment #34
Marco Aurelio Rocca CreditAttribution: Marco Aurelio Rocca commentedExperiencing similar problem with Core 7.57 Views Version: 7.x-3.18: here and there it just stops responding to Add Field, Change Field config, Add Filter or kinda anything. Only the red cross in the upper right corner of the popup responds do mouse click, closing the popup ("Apply", "cancel" or "remove" are simply ignored). No View Cache used.
Up to here, cleaning cache and leave-come-back-later has worked around.
"But 'til when, Superman?"