Closed (duplicate)
Project:
Bootstrap
Version:
7.x-3.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2015 at 13:28 UTC
Updated:
22 Jul 2019 at 04:45 UTC
Jump to comment: Most recent
I'm getting the error
Fatal error: Call to undefined function bootstrap_form_process() in /srv/http/*****/includes/form.inc on line 1870
When editing a display mode of a node... in the seven theme.
Comments
Comment #2
markhalliwellI cannot reproduce this. See related issue.
Comment #3
Anonymous (not verified) commentedYes, I know this is task is closed, and yes, I've reviewed everything in the related issue and I get how it's not Boostrap theme's fault. But I've spent so many hours trying to find a way to work around the underlying issue and Google points to these issues when you search for the error message
Fatal error: Call to undefined function bootstrap_form_process() in /srv/http/*****/includes/form.inc on line 1870that I'm posting what resolved the issue for my circumstance for other poor souls who may benefit.Conditions:
- Custom entity type type Story Block with two bundles, Section and Block
- Nested entity references using Inline Entity Form (content type references Section; Section references Block)
- Adminimal (non-Bootstrap) admin theme
- Custom Theme that started life as the Bootstrap contrib theme
Steps to reproduce:
Error: Call to undefined function _CUSTOMTHEME_process_element() in form_builder() (line 1871 of /var/www..../includes/form.incI found a variety of questions and answers here and on Stackexchange that pointed in the direction of system/ajax not having clear direction on what theme to use and without that, it will use the default theme, in my case, the Custom Theme. Using hook_admin_paths has resolved the issue.
Would it be better for Inline Entity Forms module to fix it so that the admin theme (or whatever theme is used on the page when you start editing) is used for the duration of the edit session? Probably so. Lacking that and considering that I don't see a way to patch IEF to accomplish that, this works for me.
The suggestion here https://www.drupal.org/node/2156371#comment-10637278 may also work, but I had some issues with ThemeKey, so hook_admin_paths worked better in my case.
Comment #4
ph7 commentedMy use case is almost the same as described in this issue with the exception of the custom content type. In my case the error appears in an image field that's part of a profile2 custom profile. Specifically when I try to add and save a default image to the field. The default image widget uses ajax.
I would argue that whenever bootstrap and adminimal are enabled an unforced ajax callback will trigger this error.
Using a similar hook_admin_paths function provided in this ticket solved my problem.
Comment #5
only4kaustav commentedI tried to find possible solution and many users are telling that Changing
max_input_varsin PHP have solve the issue but it didn't solve the issue for me. This error occur on non bootstrap theme while we are trying to upload a file/image by file browser input element of a form. Actually while uploading a file it is using a ajax url(you can check it in inspect panel network tab) which is invoking bootstrap theme and add _bootstrap_process_element in submit hook. So either we need to stop this url to invoke bootstrap theme while calling from non bootstrap theme or form need to be load in bootstrap theme.For our case "file/ajax/*" url creating the issue. For that we implement hook_custom_theme and specify this url to load admin theme (non bootstrap theme)
Comment #6
phuocdv commentedthanks only4kaustav (#5) . your solution has resolved the issue for me.