Cause
This is technically a core bug: lack of theme context when building the element_info array. This has already been fixed in D8, but is still an issue in D7 and needs a backport: #2448843: [regression] Themes unable to implement hook_element_info_alter().
How does this happen?
There are likely two scenarios as to how this bug actually occurs:
- Menu access callback invokes hook_element_info[_alter]() callbacks before the theme has initialized (#2351731: hook_element_info_alter() does not always get invoked in themes)
- hook_element_info[_alter]() was likely invoked with a bootstrap-based theme prior to invoking an [administrative theme/non-bootstrap based theme] AJAX request.
Possible Solutions
This is not an issue with this project and any patches (or hacks) here will not be implemented or endorsed by this project. Please, do not use them.
Instead you should use one of following temporary methods:
- Patch core until a D7 backport can be committed: #2448843-34: [regression] Themes unable to implement hook_element_info_alter() (patch)
- Make all your themes (admin and non-admin) Bootstrap based.
Original report by @mattsmith3
Working with Display Suite, and a content type with several fields. When I change a field location the page reloads and it looks like it's trying to load boostrap elements on the seven theme (see attached).
When I save the form in this state, I get the error:
Fatal error: Call to undefined function _bootstrap_process_element() in /../public_html/includes/form.inc on line 1801
Changing the theme to bartik resolves for now, but sucks for theming.
Comment | File | Size | Author |
---|
Comments
Comment #1
mattsmith3 CreditAttribution: mattsmith3 commentedmax_input_vars php variable. See here: https://drupal.org/comment/8197359#comment-8197359
Comment #2
markhalliwellComment #3
NVaissaud CreditAttribution: NVaissaud commentedIf #1 doesn't make any change, you can just add somewhere in your custom module:
require_once(drupal_get_path('theme', 'bootstrap') . '/theme/process.inc');
Comment #4
bdanin CreditAttribution: bdanin commentedThanks, comment #3 helped me. I added this to the top of ds.module
Comment #5
bdanin CreditAttribution: bdanin commentedThis seems to be a problem with display suite. I was getting this error using the theme seven.
I apologize in advance for my improperly titled patch, this is the first patch I've ever submitted.
Comment #6
markhalliwell@bdanin, thanks for your first patch! However, I must point out at least one major flaw with this:
79,308 reported installs of DS - 19,330 reported installs of Bootstrap === 59,987 sites that just broke because they're "required" to load a file that doesn't exist.
That's why @honeym00n said to use it in a custom module. I'm not entirely sure neither module should be patched though. This issue has been marked appropriately already since the reporter found that the reason this is happens is because the
max_input_vars
PHP variable needs to be increased.Please don't let these technicalities stop you from submitting further patches though :D We always appreciate the help!
Comment #7
bdanin CreditAttribution: bdanin commentedFair enough, changing
max_input_vars
in PHP didn't solve the issue for me. Also I only got the error on theme seven, so I didn't think it was a bootstrap issue. But on second glance, the require is pulling in a file from the bootstrap theme.To clarify a bit more, this happened to be when using Display Suite in theme seven to create a dynamic block that pulls in existing content as a node-id. However, the final output of the site is using the project/bootstrap theme.
Comment #8
jrbI'm pretty sure this is a Bootstrap issue that needs to be fixed. What appears to be happening is that Bootstrap is registering a "#process" function for form elements in a hook_element_info_alter() call:
This _bootstrap_process_element function is in the /theme/process.inc file. If you're on an admin page and you don't have the Bootstrap theme set as your admin theme, this function isn't defined because that file isn't included. That's what's giving the error.
I was able to fix this by adding the following hook_init() function to a custom module, but I don't think that's a reasonable solution for most users:
I'm not sure what the real solution would be because Bootstrap is trying to change something when it's not really loaded. Maybe there needs to be a "Bootstrap Tools" module that is a dependency and includes this function?
Comment #9
markhalliwellWhat admin theme are you using?
Comment #10
jrbI'm using Rubik, but I can recreate the issue in Seven as well.
Comment #11
markhalliwellI still cannot reproduce this using latest core, bootstrap, ds and seven.
drupal_alter() only invokes the active theme (theme used for that path) and it's inherited base themes. So if your admin theme isn't bootstrap based,
bootstrap_element_info_alter()
shouldn't be invoked at all, which is what adds the#process
function.I'm really at a loss here. I've gone through display suites code (and know it quite well), but haven't found any code that actually loads the default (not active) theme's template.php file.
Do you have any other modules enabled that might have their code entangled with enabling/including a theme's template.php file?
Comment #12
jrbI think I see what's going on.
In my case, the problem is occurring on an admin form for the OpenX module. And it only happens when I submit the form after previously clicking an "Add zone" button which makes an Ajax call. This Ajax call is made to the path "/system/ajax". As that call is processed, it doesn't think it's on an Admin page, so it uses the default theme for the site (Bootstrap). Bootstrap adds that "process" function to the elements; but, when the form gets submitted, it's no longer using that theme (it's using the Admin theme) and that function is no longer defined.
I've confirmed this by having bootstrap_element_info_alter() make a call to watchdog(). The $theme_key global variable is set to bootstrap during the "/system/ajax" call.
I couldn't recreate the issue myself with an "Add another item" button on a node edit form, even though that does make a call "/system/ajax". Bootstrap's bootstrap_element_info_alter() function does not get called. I added a watchdog() call to a hook_init() function; and, for that call to "/system/ajax", $theme_key is (correctly) set to "seven".
I'm not sure what that OpenX form is doing differently. Whatever it is, Display Suite may be doing the same thing.
Comment #13
Andre-BI can reproduce this using message and locale modules. Up on message type creation I switch the language for the message and hit save, which results always in a fatal error with
PHP Fatal error: Call to undefined function _bootstrap_process_element() in /project/includes/form.inc on line 1815
Comment #14
seycom CreditAttribution: seycom commentedSame problem. I have node with multiple images field which used ajax. After deleting one of the images and trying to save node I get the error:
Fatal error: Call to undefined function _bootstrap_process_element() in /[..]/includes/form.inc on line 1850
Increasing max_input_vars did not help.
Comment #15
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commented@jrb (8): Yes, Bootstrap certainly needs a 'Bootstrap Tools' companion module because currently it's trying to do things in the theme layer that need to be done earlier -- and the possible overridden in the theme layer. Adding a hook_init() to fix this is, as you say, not a great solution and carries a significant cost with it.
This is a flaw in the current architecture of the theme, and unfortunately requires developers to jump through hoops to resolve -- or make unwise direct connections between other modules and specific themes.
@seycom (14): We fixed this with theme-level form alter to re-attach the right files required. Unfortunately Drupal assumes this can only happen to Module files, so I had to cut/paste/alter some core code into the template.alter.inc file.
E.g. Our fix...
Comment #16
seycom CreditAttribution: seycom commented@Jim Kirkpatrick (15): Thank you, no errors now!
Comment #17
markhalliwellThe solution in #15 isn't very manageable, in the long haul. Now that we have the _bootstrap_get_base_themes() helper function, I think we can safely wrap the include of the alter file. Here's a patch. Please see if this fixes this issue and I'll commit it.
Comment #18
seycom CreditAttribution: seycom commented@Mark Carver (17): for me it does not work. After patch I get error on all pages:
Fatal error: Call to undefined function _bootstrap_get_base_themes() in /[...]/sites/all/themes/bootstrap/template.php on line 56
Comment #19
markhalliwellYou have to apply it to the latest dev... That function does not exist in 3.0.
Comment #20
markhalliwellCan anyone actually verify that the patch in #17 works against the latest dev for the issue at hand (I am unable to reproduce). I would like to make sure this is the correct course of action before committing.
Comment #21
Mark_ CreditAttribution: Mark_ commentedNo, the patch in #17 did not work for me. I used the latest dev version from 2014-Jun-13, applied the patch and I am still getting:
PHP Fatal error: Call to undefined function _bootstrap_process_element() in /drupal/includes/form.inc on line 1808
By the way, I am not using Display Suite. Only the Seven theme for admin pages and node/add forms, and a bootstrap sub-theme as the site's default theme.
Comment #22
seycom CreditAttribution: seycom commentedPatch #17 - I've got no errors on latest dev.
Update: I've got no error #14 on latest dev with no patch as well.
Comment #23
yenidem CreditAttribution: yenidem commentedI updated to latest dev version and the subjected error disappeared for me. I did not applied any patch.
Comment #24
markhalliwellOk. It seems that the latest dev does not contain this weird error https://twitter.com/jrbeaton/status/480072261740027904
I suspect that perhaps maybe a core or DS update may have fixed this. Regardless, if it creeps up again, try applying the patch in #17. Only re-open again if that patch fixes it.
Comment #25
davemybes CreditAttribution: davemybes commentedJust in case someone else hits this thread, the max_input_vars=1000 was the problem for me. Lots of fields on the content type caused it, and bumping the value to 2000 fixed it.
Comment #26
robdubparker CreditAttribution: robdubparker commentedI was having the same issue:
when arranging fields in display suite teaser view. For me it seemed to be an issue with the read more control module. After disabling, the error disappeared.
Comment #27
Simon Georges CreditAttribution: Simon Georges commentedProblem is correctly explained in #12 : when you're using an ajax thing (like anything having an option in "manage display" screen, or things like that) in admin theme, theme "switches" to front theme, and the problem occurs.
Comment #28
flebrenn CreditAttribution: flebrenn commentedNew version of patch (#17) compatible with bootstrap 7.x-3.0.
Edit: instable patch.
Comment #29
flebrenn CreditAttribution: flebrenn commentedComment #30
davemybes CreditAttribution: davemybes commentedPatch in #28 worked for me. The Fatal error seems random to me - I was editing fields fine and then tried to configure another field and bang! Applying the patch allowed me to continue with configuring the field.
Comment #31
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedThis most certainly is an issue with the number of people reporting it (add me to the list), reopening although I know it is difficult to reproduce.
Comment #32
sam2de CreditAttribution: sam2de commentedI'm getting this error with 7.3.0, when I change any field display (from Visible to hidden) in the "Manage display" for any content type. Really weird!
Comment #33
electrocret CreditAttribution: electrocret commentedI get this error when I try updating the display for the leaflet format for a geofield. none of the patches so far work. When I switch to a different theme, I have no issues.
Comment #34
conork CreditAttribution: conork commentedI was having a similar issue to this. (using a Bootstrap Subtheme). In #8 I noticed the topic of admin themes potentially being an issue. I (re)enabled the overlay module, and all is working. This is really only a band-aid to the larger issue, but hopefully this might help others
Comment #35
fearlsgroove CreditAttribution: fearlsgroove commentedI was having this issue trying to use hierarchical select with bootstrap. I can confirm the patch fixes the problem. Here's a reroll against -dev.
Comment #36
fearlsgroove CreditAttribution: fearlsgroove commentedOops -- that last patch included a separate fix too.
Comment #38
fearlsgroove CreditAttribution: fearlsgroove commentedI should just give up i think.
Comment #39
fearlsgroove CreditAttribution: fearlsgroove commentedAlter is in includes now
Comment #40
markhalliwellI still would like to figure out the steps to reproduce this. I have never seen this error in any site build I have done with this base-theme.
What modules does this conflict/needs testing with?
What conditions must be met for this to happen?
A theme's alterations are not supposed to be called unless the theme is active, see drupal_alter().
The patches above are simply a hack. I would really prefer to not put this in if possible and, instead, get to the root of the issue.
Comment #41
fearlsgroove CreditAttribution: fearlsgroove commentedAgreed it seems kinda hacky and shouldn't be necessary. Possible we're exposing a core bug? I'll try to look into a reduced test case. If it's helpful, where's what's involved for me:
Note that the callback above is NOT an admin theme. You'd think it wouldn't engage the alters at all.
I've had to hack the hierarchical select module to get it to run properly due to a couple issues, so it will take some effort to make a test case using that specifically.
Comment #42
markhalliwellAh. Actually I would surmise that it is actually a hierarchical_select bug and not a core issue. I've seen this module be a culprit on more than one occasion in this queue.
Just briefly looking through their hooks and JS, I'm not entirely sure they're using the theme callback,
ajax_base_page_theme()
appropriately in conjunction with their own$.ajax()
requests. It is probably not sending theajax_page_state[theme]
in the POST request, which that callback needs. See:/misc/ajax.js
.These are added to
Drupal.ajax
requests based on the#ajax
element provided in render arrays. Many custom modules that implement their own custom JS or hooks, bypassing core, do not realize the complexity behind the built-in AJAX requests and forget to add in the things that you would normally get.I'm also attaching a related issue, which may or may not help remedy this particular use case.
Comment #43
Yorgg CreditAttribution: Yorgg commentedI have applied patch provided at #36 but the issue remains the same.
It may have passed the tests, but it doesn't work in my case.
Comment #44
markhalliwell@j_nunes, the patch is a stopgap measure hack. This is why it hasn't been committed nor is it going to fix all use cases. Issues like these often are due to some module not using an API correctly (probably with AJAX requests) as I mentioned above with the hierarchical_select module. I would recommend trying to pinpoint what module it is and open an issue there and referencing this one.
Comment #45
mstrelan CreditAttribution: mstrelan commentedFor me the issue occurs under the following circumstances.
So for me the solution must be to prevent the theme from switching on ajax responses, but I don't know if that's a Bootstrap problem, or a DDF problem, or some other module's problem.
Edit: I should add, that if I upload the file first the theme key returned in the ajax response is "seven". I can then update my DDF field (which returns my subtheme) and successfully save the node.
Comment #46
markhalliwellIt's not Bootstrap, but you definitely hit the head on the nail: "DDF/some other module's problem".
I am assuming this is core's file upload? If so, this makes sense as core follow's it's own APIs :)
Seems like you figured out who is responsible.
Comment #47
mstrelan CreditAttribution: mstrelan commentedFile upload can be either core or media module, both present the error. I think you're too quick to blame ddf, other users have reported similar issues with hierarchical select, and display suite. So it sounds more like a general Ajax issue. Maybe it's bootstrap, maybe it's a core bug, maybe it's something like ctools.
Comment #48
mstrelan CreditAttribution: mstrelan commentedJust read #42, I'll look in to that further.
Comment #49
markhalliwellI'm definitely convinced now that this isn't something that should or can be fixed in this project. Please open issues for the module that is incorrectly dealing with AJAX requests. Please do not re-open this issue.
Comment #50
jummonk CreditAttribution: jummonk commentedPatch fatal_error_call_to-2156371-17.patch was failing on 3.x-dev.
I recreated a patch which works for me.
Comment #51
jummonk CreditAttribution: jummonk commentedA version of the patch for 3.0
Edited: DO NOT USE THIS PATCH
_bootstrap_get_base_themes() is missing in 3.0
Comment #52
jummonk CreditAttribution: jummonk commentedIf patch bootstrap-undefined_function_bootstrap_process_element-2156371-28.patch for version 3.0 fails to succeed try this patch for 3.0.
Comment #53
jummonk CreditAttribution: jummonk commentedAnd finally the really really correct patch for 3.0
Have to use array_key_exists instead of in_array as the theme machine name is in the keys, not in the values of the array.
So patches bootstrap-undefined_function_bootstrap_process_element-2156371-28.patch or fatal_error_call_to-2156371-52.patch only work as long your NOT on a theme which has a bootstrap as base theme but fail when you are.
Use this one for version 3.0 instead.
Comment #54
markhalliwell@jummonk, this issue will not be committed to the repo. Please see the issue summary.
Comment #55
rcodina CreditAttribution: rcodina commentedLike @incrn8, just increasing PHP config variable max_input_vars from 1000 to 1200 solved the problem for me.
I think the problem simply occurs when you have a long list of fields in manage display view using Display Suite layout. And maybe without using Display Suite it may occur too (Just read about max_input_vars config variable on php.net)
Comment #56
dshumaker CreditAttribution: dshumaker commentedFor what it's worth, I am NOT using Display suite and still get this error on node creation forms
I tried switching to bartik for the admin theme and that did not help, nor did increasing max_input_vars to 2000.
What did work is switching to a radix theme as the admin theme.
Comment #57
markhalliwell@dshumaker, the error you provided above is for the Radix theme, not Bootstrap. As stated in the issue summary, the problem likely lies in some sort of module (not necessarily DS) that implements an AJAX request and doesn't properly send which [current] theme should be used in the request.
Comment #58
dshumaker CreditAttribution: dshumaker commentedThanks Mark, I knew that, but Radix is based off of bootstrap and so thought my fix might help someone.
Comment #59
markhalliwellIt's based off the Bootstrap framework, yes, but not this project. It's an entirely separate base-theme: http://cgit.drupalcode.org/radix/tree/radix.info
Comment #60
dshumaker CreditAttribution: dshumaker commentedThat's interesting, I actually was using Rubik as my admin theme as @jrb was. Sorry for the mis-information. Google brought me here when I was searching for solutions.
Comment #61
albertski CreditAttribution: albertski commentedI ran into the same issue today when creating a feature for a content type. Adding max_input_vars = 2000 to my php.ini fixed the issue for me.
Comment #62
maxplus CreditAttribution: maxplus commentedThanks,
Working with Adminimal as admin theme and had the same issue.
=> increasing PHP config variable max_input_vars from 1000 to 1200 also solved the problem for me
This issue was also present in the Kalatheme issue que: https://github.com/drupalprojects/kalatheme/issues/160
Comment #63
albertski CreditAttribution: albertski commentedIn #61 the issue was fixed but I ran into the same error when updating a node and filling out more fields. This time the max_input_vars increase didn't work but @Jim Kirkpatrick solution in #15 fixed the issue for me.
Comment #64
markhalliwell#15 isn't really a "solution"... it's more of a makeshift hack. Please read the issue summary to get a better understanding of why this is likely happening in the first place.
Comment #65
markhalliwelledit: I'm also half tempted to close commenting on this issue to prevent further unnecessary noise.
Comment #66
BigEd CreditAttribution: BigEd commentedTrouble is if you can't close, as the error will still come up for people.
Fatal error: Call to undefined function _bootstrap_process_element() in /var/www/public_html/drupal/includes/form.inc on line 1850
Someone will likely make a new issue post, as this is the only place related to this error. That is until it can be passed on to somewhere else.
Changing the max_input_vars did not work for me.
Although adding this line did to the top of the ds.module
require_once(drupal_get_path('theme', 'bootstrap') . '/theme/process.inc');
This is not really a solution to hack the module and its likely to be different module for some other users, I suppose we could make a template hook to add the line in but this again is a work around and not solving the problem.
I can make a corresponding issue with the maintainer and see if they have any suggestion's but I think this is a red herring.
Comment #67
markhalliwellOk... so, yeah... I totally spaced that this is actually really a core issue (I had made the connection, but forgot to make a comment here when I was involved with those issues).
Module/themes are really just the unfortunate casualties when core builds its "element_info" without any regards to theme context.
D8 has been fixed (see related issue) and is now sitting as a backport for D7.
For a simpler/completed D7 patch (or at least to gain some background around what is actually happening), see #2351731-9: hook_element_info_alter() does not always get invoked in themes.
I've also updated the issue summary accordingly.
Comment #68
kumkum29 CreditAttribution: kumkum29 commentedHello Markcarver,
With my site i get also this error when I save a node :
PHP Fatal error: Call to undefined function bootstrap_form_process() in /srv/data/web/vhosts/mydomain.com/htdocs/includes/form.inc on line 1850
I have tested your patch (https://www.drupal.org/comment/9701387#comment-9701387), but I get always this error. This patch don't resolve this bug for me....
For me, the only solution is to use the Bootstrap theme for admin pages, and desactivate the seven admin theme.
Comment #69
markhalliwellAre you sure? Did you clear caches after patching? It may need the D8 backport version after all (which includes cached DB entries of the element info per theme).
The only reason I am involved with this issue is because whatever does cause this issue to manifest, it does so because this base-theme takes advantage of element info altering (which not a lot of themes do, but is how the theme system is supposed to work and allows it).
Obviously there is some disconnect in an AJAX request for what "theme" is supposed to be rendering (which is ironic because not all AJAX requests need the theme initialized, but that's a side-rant).
In any case, you'll either have to live with the admin theme (for now) or you'll have to try and figure out (debug) why your installation is throwing this error. I do not have the time to handle every unique case, especially ones I don't have access to (and no, do not send me login/server credentials).
FWIW (and to repeat) I have never actually seen this "error" and agree with @BigEd (#66) that this issue is likely just a red herring.
Comment #70
kumkum29 CreditAttribution: kumkum29 commentedHello markcarver,
I have found a solution with this code (in a custom module):
Now, i can save the nodes from the seven theme. This is a similar solution to the post #66.
In my another websites, I get no this bug....strange...
Comment #71
N1ghteyes CreditAttribution: N1ghteyes as a volunteer commentedas posted here: https://www.drupal.org/node/2529140 (which was closed as a duplicate) i'm seeing similar issues when setting a bootstrap theme as admin without a bootstrap theme on the front end.
Unfortunatly none of the patches or fixes in this issue thread seem to work, as its not just process.inc that gets called (common.inc is called as well). Manually adding in those calls to register the function causes the styling on the front end to get messed up.
So, as of yet for me atleast, no fix for this one :(
Comment #72
markhalliwellComment #73
milos.kroulik CreditAttribution: milos.kroulik commentedI also seem to have the same problem as #71. Unfortunately, changing themes don't have any effect, the error is still the same.
EDIT: It turns out that my problem is likely unrelated to that. Sorry.
Comment #74
markhalliwellI'm re-opening, but as a minor and postponed for the following reasons:
Comment #75
jOksanen CreditAttribution: jOksanen at Realityloop commentedGot this issue.
To reproduce.
1. Install bootstrap theme
2. Set an admin theme and other theme as not bartik
3. Load bootstrap theme on admin with
/**
* Implements the change of theme.
*/
function hook_custom_theme() {
if (arg(0) == 'admin') {
return 'bootstrap';
}
}
4. Go edit a node, see bootstrap load and fail when pressing save on a node.
#3 fixed in custom module.
Comment #76
markhalliwell@jOksanen, I still cannot reproduce with these steps. What modules/fields are being used on the node? Can you provide a screencast (movie) or screenshots (images) of this error?
I'm very tempted to close this issue again.
Comment #77
SkinSame problem form me, If I try to upload a photo and save I get this error :
Fatal error: Call to undefined function _bootstrap_process_element() in /home/borgo/public_html/includes/form.inc on line 1870
Changing max_input_vars in PHP didn't solve the issue..... the strange thing is that I've been able to upload about 70 photos before the problem has manifested itself
Comment #78
markhalliwellHonestly... how am I supposed to fix this? Saying "I have the same problem" and listing the same error as everyone else isn't very useful to me. I am well aware people are having this issue.
I would love to fix this. I really don't like it when people have problems like this, I like developing quality code.
So please give me the exact steps on how to reproduce this issue:
I cannot fix something that is extremely inconsistent and non-reproducible on my end.
Comment #79
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedmarkcarver, I think if my memory serves me okay it seems like this issue was solved for me by #55 above. Perhaps altering that environmental variable on your install might make this issue occur on your system too.
Comment #80
N1ghteyes CreditAttribution: N1ghteyes as a volunteer commentedJust to prevent too much searching down the wrong route, #55 did not fix this for me. Its still an issue.
For me to recreate simply set a bootstrap theme or subtheme as the admin theme with a non bootstrap theme on the front end. Nothing else needed
Comment #81
markhalliwellMy comment #78 was in response to #77 where it was noted that changing
max_input_vars
did not work. This means the issue really lies elsewhere.Comment #82
markhalliwell@N1ghteyes, you'll need to be a little more specific... I did what you suggest and did not run into any problems: http://take.ms/9GrVU
Comment #83
N1ghteyes CreditAttribution: N1ghteyes as a volunteer commented@markcarver Not sure i can be, thats literally all i did. Are you testing this locally? maybe some weird config issue for either me or you? I'd be supprised if it was though...
If i get half a chance i'll dig through my setups and see if i can find anything specifically different.
Comment #84
filippo.ledda CreditAttribution: filippo.ledda at Infora commentedHope it can help someone: setting the ajax path to the admin theme with admin_theme solved the problem for me with Bootstrap 3.1, after having tried without success almost all the listed patches (except the core patch suggested by markcarver, the maintenance of the project could be an issue in my case with a core patch).
I'm not 100% sure that this is the key, but the exact thing I did is set media/ajax/* to the admin theme paths in the admin_theme configuration. Removing the line from the configuration, the error comes back.
Unfortunately, I haven't managed to reproduce the error on a clean installation on the same machine.
I try to give some details that may help: I can see the error appears while editing in the node form a field with an image (with media widget in my case), and I can see correlation of the error with the presence of fields with hierarchical select and field collection. Display suite is set on the form but disabling it didn't work out. The site is quite big (100+ contributed modules) and the content types have 25+ fields.
Comment #85
NIKS_Artreaktor CreditAttribution: NIKS_Artreaktor commentedI have this and other issue - connected with field collection theming on node edit.
Using admin theme - Seven.
1) fixed of fatal error by adding process.inc in template.php
======
2) Second issue connected with
https://www.drupal.org/node/2156371#comment-8671153
I have field collection module installed.
And if i have > 3 items of field collection (FC) - it start error.
After you save node with 3 FC items - open edit and start delete one of the module - the theme of items inside FC - will trigger on another (seems to me Bootstrap). If you click again add/remove item - it will trigger on Bootstrap sub-theme.
Everytime it adding css of the theme.
But it happens only if items 3 and more.
If only two items - everything ok.
I didn't increase max- max_input_vars = 2000
===
I see that a lot of problems it is from Bootstrap template.php
/**
* Include common functions used through out theme.
*/
include_once dirname(__FILE__) . '/includes/common.inc';
And including other inc files.
Is there some method DO NOT include functions of theme OUT of Base/Sub Bootstrap Theme ???
If i will disable all bootstrap themes - everything working good.
We don't need Bootstrap functionality in other NON Sub-theme of Bootstrap.
Or I'm wrong?
Waiting for ideas. Thanks.
Comment #86
markhalliwellRead the issue summary (and entire issue).
---
I'm closing this since no one can seem to provide consistent steps for me to reproduce.
Comment #87
NIKS_Artreaktor CreditAttribution: NIKS_Artreaktor commentedmarkcarver
I don't know my issue got to be here or somewhere.
About fatal error - already have fixed.
Please, 2 questions:
1) It is important to influence on other NON Bootstrap theme, by adding common.inc file by default (for example)?
2) About theme of items in Field collection, when we are on node edit page Add/delete items by ajax. (Entity line items)
Like in https://www.drupal.org/node/2156371#comment-8671153
About Field Collection(Entity items) Add/remove and theme using for thous fields.
Drupal 7.41
Installed
Bootstrap 3.1
Bootstrap Sub-theme
Seven theme - for Admin Theme
Field collection
Node type - Basic page
Have
Image field
Field collection field - with 3 items (important for my case) (with 2 items working greate).
I have node with 3 Field collection items.
When i remove one of them - fields in Field collection wrapper gut another theme.
After that i remove one more - and got already inluded Bootstrap Sub-theme css-s.
I mean - on the page connecting css-s of other bootstrap themes.
Please could you propose something.
I am stuck.
I could give Video )
(Also saw issues connected with entity items here
https://www.drupal.org/node/2137237
)
Or we are waiting for Patch
https://www.drupal.org/node/2448843#comment-10093134
be applied in core?
Thank you very much for advices.
Comment #88
NIKS_Artreaktor CreditAttribution: NIKS_Artreaktor commentedSome fixing for ajax add/delete items of field collection in node/edit
Installed module
https://www.drupal.org/project/themekey
Added rule
If drupal:path = system/ajax
then use Admin theme.
It was temporary fixing of my 2nd problem from 87 post.
===
I understand that determining of base theme (is it Bootstrap or Sub-bootstrap theme) sometimes get error and Bootstrap function influencing on other themes.
Waiting of patch porting to Drupal 7.
Comment #89
sashken2 CreditAttribution: sashken2 as a volunteer commentedI have same error too when I use DS module with extra fields enabled. Bootstrap sub-theme - base theme. Seven - admin theme. After set Bartik as base theme - no error.
Comment #90
NIKS_Artreaktor CreditAttribution: NIKS_Artreaktor commented@sashken2
That because - you disabled Bootstrap theme. It use some functionality that make this error/
Another solution of all my problems - set max_input_vars = 2000
It solved problems with theme switching in ajax (add/delete field collection items) and with with Fatal error problem.
I thinks with Bootstrap theme ON - it taking some more max_input_vars including with field collection or DS modules, when editing some nodes.
Thank for attention.
Comment #91
clemens.tolboomI got this error when selecting a Display Suite layout for node/fields/view. Ignoring the stack trace and resubmitting the form got me back to the chosen layout.
When first using bootstrap we had lot's of bootstrap functions triggering without having the sub theme being default. Guts feeling this is a core issue.
Comment #92
clemens.tolboomSorry for the state change
Comment #93
clemens.tolboom@NIKS_Artreaktor I tried up to
but are unable to submit my /admin/structure/types/manage/my-type/display/view page. My content type has 113 fields :(
Comment #94
knalstaaf CreditAttribution: knalstaaf commentedI stopped having this issue after upgrading to 7.x-3.4.
Comment #95
tahiche CreditAttribution: tahiche commentedjrb´s #8 Solution worked perfectly for admin theme Seven when trying to save after Media Browser in Lightbox. Had previously tried to increase max_input_vars=2000 to no avail.
Comment #96
markhalliwell#8 is not a "solution".............
Comment #97
markhalliwellI am un-publishing all "solutions" to this issue and closing comments. The issue summary explains exactly where the issue really lies (either a core or contrib issue).