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.

Files: 
CommentFileSizeAuthor
#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 ]

Comments

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

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.

Status:Active» Needs review
StatusFileSize
new746 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.

StatusFileSize
new676 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.

Status:Needs work» Needs review

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.

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

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.

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.

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.

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.

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.

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

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.

StatusFileSize
new109.44 KB
new151.88 KB

Hi,

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

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.

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.

subscribing same issue(s)

patch in #5 seems to have worked

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.

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.

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

#21 worked for me, too.

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?

The fix in #21 worked for me as well.

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

Issue summary:View changes
StatusFileSize
new175.24 KB

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.

Disabling Views cache has also worked for me too