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.

#27 cache_views_20140129-d.o-issue-1955472.sql_.zip175.24 KBjordan8037310
#16 cache_views.sql_.zip151.88 KBandreic
#16 Screen Shot 2013-05-30 at 2.49.43 PM.png109.44 KBandreic
#5 views-no-header-avail-1955472-4.patch676 bytesard00d
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View
#3 views-no-header-avail-1955472-3.patch746 bytesard00d
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-no-header-avail-1955472-3.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more


joshuaw’s picture

I'm also experiencing this issue. Strangely, the fields are available when first creating a new view.

joshuaw’s picture

Still 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.

ard00d’s picture

Status: Active » Needs review
746 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-no-header-avail-1955472-3.patch. Unable to apply patch. See the log in the details link for more information. View

This patch seems to fix things for me

Status: Needs review » Needs work

The last submitted patch, views-no-header-avail-1955472-3.patch, failed testing.

ard00d’s picture

676 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View

Ok, so my first attempt at submitting a patch here seems to have failed...let me try this again.

ard00d’s picture

Status: Needs work » Needs review
pmuzyk’s picture

I 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.

freidlander’s picture

I've been unable to re-create this from a fresh install. Has anyone else been able to?

joshuaw’s picture

If 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.

joshuaw’s picture

My 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.

pmuzyk’s picture

My 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.

gerrit1978’s picture

I 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.

freidlander’s picture

The 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.

gerrit1978’s picture

#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.

dawehner’s picture

Status: Needs review » Needs work

The 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.

andreic’s picture


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,

andreic’s picture

If 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.

fluffy’s picture

I 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.

stephenplatz’s picture

subscribing same issue(s)

patch in #5 seems to have worked

WigglyKoala’s picture

I 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.

nramirezsalas’s picture

Hola, en mi caso hice lo siguiente en ( admin/structure/views/settings/advanced ) :

  1. Marqué la casilla de "Disable views data caching"
  2. Borré las cachés de views
  3. Refresque la página de la vista que estaba editando
  4. Agregué el campo para el "header" y guarde la vista

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.

audealexandre’s picture

The solution in #21 worked for me (views 3.7, authcache + memcache).

sjhuskey’s picture

#21 worked for me, too.

TBarina’s picture

Same 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?

DrCord’s picture

The fix in #21 worked for me as well.

Koozer’s picture

Clearing and disabling the cache does not work for me, nor does cloning the view.

jordan8037310’s picture

I 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.

WigglyKoala’s picture

Disabling Views cache has also worked for me too

nikathone’s picture

#21 worked for me as well. Approximate English translation

Hi, in my case I did the following in (admin / structure / views / settings / advanced):

  1. I checked the box for "Disable views data caching"
  2. Clear Views' cache
  3. Refresh the page view you were editing
  4. I added the field to the "header" and save the view

I know it's not the ideal solution but then you add the "header" I can clear the "Disable views data caching" and so I leave it as it was. In my case It worked, greetings.

abrlam’s picture

#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?

wer0ckz’s picture

#21 works! Thanks

leoklein’s picture

#21/#29 works. Mucho thankyou's!

kjala’s picture

#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.