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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

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
FileSize
746 bytes

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

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
gigapat’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.

richard.french’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.

gigapat’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.

richard.french’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

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

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).
Thanks!

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.

Marco Aurelio Rocca’s picture

Experiencing 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?"