Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Fatal error: Call to a member function setRecipients() on null in C:\xampp\htdocs\first\core\profiles\standard\standard.profile on line 24
plzz help me..i got this error after providing username email id and password info of the site
If you have arrived here from a search, please read the thread before commenting. The immediate cause seems to be a need to configure opcache.
Comment | File | Size | Author |
---|---|---|---|
#50 | Capture.PNG | 43.69 KB | AmruthaKR |
#45 | fatal_error_standard_profile--add_existence_check--2780071-45.patch | 724 bytes | merauluka |
#24 | issue.png | 18.73 KB | Prashant_kr_verma |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedComment #3
cilefen CreditAttribution: cilefen commentedAre there any other warnings or errors?
What is the version of XAMPP and what is the version of PHP on the site?
Comment #4
alexpottThe only way this could happen is if the contact form with the ID feedback does not exist... see standard_form_install_configure_submit().
How are you doing the install?
Comment #5
Turamarth CreditAttribution: Turamarth as a volunteer commentedSame problem here > Fatal error: Call to a member function setRecipients() on null in C:\xampp\htdocs\Drupal\core\profiles\standard\standard.profile on line 24
XAMPP Version 5.6.21
PHP Version 5.6.21
Database Server version 10.1.13-MariaDB
Comment #6
Turamarth CreditAttribution: Turamarth as a volunteer commentedReviewed the OPCache config in php.ini, and change a few things to optimal performance and works now. check https://www.drupal.org/node/2623566 & http://php.net/manual/en/opcache.installation.php
Comment #8
greta_drupal CreditAttribution: greta_drupal as a volunteer commentedI'm using:
XAMPP v. 3.2.2
PHP 7
Windows 8
This XAMPP installation already includes the [opcache] section in PHP.ini file, as described in first comment here: https://www.drupal.org/node/2623566 (about configuring OPCache). But, you do have to enable it -- it is off by default, and add the zend_extension URL reference (see note below). For good measure, I increased limits for a few options in this subsection, per the other suggested OPCache configuration website. My steps to resolve:
1. Stopped Apache.
2. Modified and saved PHP.ini file
And, I added the zend_extension reference to the PHP.ini file [PHP] section -- important to add it in this section. I added it at the end of the "Paths and Directories" subsection of that PHP section:
3. Restarted Apache.
NOTE: The ellipsis in the above represent unchanged code omitted for compactness.
Comment #9
greta_drupal CreditAttribution: greta_drupal as a volunteer commentedRelated to this issue, it should be noted that during the (auto) installation process, Drupal merely recommends that OPCache be installed -- not require it. In that case, no user should get this error attempting to complete a Standard installation. #UI-UX-Fail
I have never used the 'auto' core install before, but decided to test it. It took 4 attempts to get a successful basic, Standard install! -- between this error and other necessary PHP.ini tweaks needed - not reported in install.txt file.
The install.txt file really should include the following recommendation:
1. Modify PHP.ini file thusly:
A. Increase memory to:
memory_limit=256M
B. Increase execution time (at least on XAMPP) to:
max_execution_time = 120
C. Modify for OPCache [ref to instructions *]
(Especially given that users coming from WordPress are use to a < 5 min install, with no required php.ini modifications.)
Comment #10
cilefen CreditAttribution: cilefen commentedYeah, weird things can happen when memory is exhausted.
install.txt links to https://www.drupal.org/requirements and the PHP section of that page links to https://www.drupal.org/docs/7/system-requirements/php that includes some of these details. Both pages are editable and have discussion pages. I don't know the history here, but I assume the intent of install.txt is to keep things simple to alleviate maintenance (because install.txt is part of the codebase) and to offload fine details to drupal.org.
By the way, the opcache settings you posted in #8 are all commented-out.
Comment #11
greta_drupal CreditAttribution: greta_drupal as a volunteer commentedYes, I get the idea of brevity in the install.txt file. But, it does include a few other "server tips", so these important roadblock ones seem appropriate. I mean, we are talking about basically a single sentence. ...As for the remarked out opcache settings: good catch; sure, they should be uncommented on the day. I'll edit my post. (My local, XAMPP install works with them commented or uncommented.)
Comment #12
javier-franco CreditAttribution: javier-franco as a volunteer commentedI'll follow the https://www.drupal.org/docs/7/system-requirements/php
Adding the requested requirements por Drupal 8.
Almost everything it's fine.
I couldn't set up the opcache.file_cache_only
opcache.file_cache = true ; it's no value by default
;opcache.file_cache_only = true ;Raise HTTP 500 if active
Maybe it's something related to my hosting service. I don´t know.
The rest of the configuration i follow the recommendations.
Then, i can access start page.
(Note: a have a problem them,...
Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.
but that's another issue....)
Comment #14
sahu g CreditAttribution: sahu g commentedi also face same problem plz help me
Comment #15
sahu g CreditAttribution: sahu g commentedFatal error: Call to a member function setRecipients() on null in C:\xampp\htdocs\library\core\profiles\standard\standard.profile on line 25
Comment #16
cilefen CreditAttribution: cilefen commentedDid the findings in #9 not help?
Comment #17
Neelanjana Das CreditAttribution: Neelanjana Das commentedi tried the comments #8 and #9. the problem is still not fixed.
This is what i keep getting
Comment #18
FreeXenon CreditAttribution: FreeXenon commentedSame problem.
I made changes from above and same error
I performed an install previously with no problems and now I am having the issue.
Very strange.
just installed Xampp on Win 10 with latest Drupal 8
Comment #19
FreeXenon CreditAttribution: FreeXenon commentedI just did a fresh install of XAMPP and D8 and only made the changes to the php.ini for max execution time and max memory
- D8 installed ok
it may be the opcache settings causing the issues for some reason. =O
anyone have an idea why?
Comment #20
cilefen CreditAttribution: cilefen commentedIt is hard to say without knowing exactly the opcache settings configured, and the version of PHP.
Comment #21
karthiselvam.seeralan CreditAttribution: karthiselvam.seeralan commentedPlease help me I followed #8 & #9 and I am getting same error message
Thanks,
Karthiselvam Seeralan
Comment #23
santhosh_1795 CreditAttribution: santhosh_1795 commentedIGNORE THAT ERROR GO TO YOUR LOCALHOST/DRUPAL_NAME AND ENTER
ITS WORKING...YOU CAN MAINTAIN YOUR WEBPAGE..
AFTER THAT YOU CHANGE YOUR EMAIL ID AND SITE EMAIL...
THANKS.
Comment #24
Prashant_kr_verma CreditAttribution: Prashant_kr_verma commentedPlease help me I am getting
Fatal error: Call to a member function setRecipients() on null in C:\xampp\htdocs\drupal8\core\profiles\standard\standard.profile on line 25 error message
Thanks,
Prashant
Comment #25
hassengh CreditAttribution: hassengh commented@greta_drupal
thanks for your post
the change in php.ini (under php ) and php.ini (under apache )
Comment #27
EnzoX CreditAttribution: EnzoX commentedSame problem here with Drupal 8.4.4.
+ Windows 10 Home 64 bit
+ XAMPP Version 5.6.31
+ Apache 2.4.26
+ MariaDB 10.1.25
+ PHP 5.6.31 (VC11 X86 32bit thread safe) + PEAR
PHP Fatal error: Call to a member function setRecipients() on null in ****\\web\\core\\profiles\\standard\\standard.profile on line 25, referer: http://******/core/install.php?rewrite=ok&langcode=it&profile=standard&continue=1
Comment #28
cilefen CreditAttribution: cilefen commentedComment #29
devu_divya CreditAttribution: devu_divya commentedError
The website encountered an unexpected error. Please try again later.
Error: Call to a member function setRecipients() on null in standard_form_install_configure_submit() (line 25 of core\profiles\standard\standard.profile).
standard_form_install_configure_submit(Array, Object)
call_user_func_array('standard_form_install_configure_submit', Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('install_configure_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('install_configure_form', Object) (Line: 899)
install_get_form('Drupal\Core\Installer\Form\SiteConfigureForm', Array) (Line: 593)
install_run_task(Array, Array) (Line: 549)
install_run_tasks(Array) (Line: 117)
install_drupal(Object) (Line: 44)
Getting this error while configuring my first site..kindly help
Comment #30
Senthil Kumar Kumaran CreditAttribution: Senthil Kumar Kumaran as a volunteer commentedI solved this issue by commenting the below line from file core\profiles\standard\standard.profile (line no. 24) and refreshed the page during installation process. Drupal site had installed successfully. The issue might be because of unavailability of the feedback form which is provided by default as contact entity. Still i have not validated the root cause. I will come up with permanent solution through a patch or in a standard way shortly. Thanks.
Line to be commented during installation when you are facing the error,
ContactForm::load('feedback')->setRecipients([$site_mail])->trustData()->save();
After successful installation, i reverted back my changes. Please note that this is a hack of core and make sure to revert back the changes.
Comment #31
Senthil Kumar Kumaran CreditAttribution: Senthil Kumar Kumaran as a volunteer commentedYes! My assumption was right. There is no contact entity with the machine name "feedback". Only one contact entity is available by default on fresh Drupal setup which is "Personal contact form" with machine name as "personal" . Hence, the below is the fix for this issue.
File: core\profiles\standard\standard.profile
Please validate and advise if i'm wrong. Thanks in advance.
Comment #32
Senthil Kumar Kumaran CreditAttribution: Senthil Kumar Kumaran as a volunteer commentedComment #33
sjerdoActually the profile standard contains an install YAML file for the feedback contact form: contact.form.feedback.yml
After creating the feedback contact form, the recipient for the form should be set to the site mail.
The personal should not have the site mail as recipient, since this form is for contacting users.
Is the feedback Contact Form not yet available in standard_form_install_configure_submit?
Comment #34
bdupls CreditAttribution: bdupls as a volunteer commentedThanks Senthil, #30 worked for me on Windows 10, Mamp Pro 4 D8 install.
Comment #35
kurinjiselvan v CreditAttribution: kurinjiselvan v as a volunteer and commentedHi..
I am also faced this issue, please follow the steps to solve this issue. No need to change the File: core\profiles\standard\standard.profile
Now you can start the drupal fresh installation process. Please delete the past drupal installation and start with fresh.
Comment #36
kurinjiselvan v CreditAttribution: kurinjiselvan v as a volunteer and commentedComment #37
viraj7686 CreditAttribution: viraj7686 as a volunteer commentedChanged below configurations during Drupal 8 setup:
Added:
$cfg['ExecTimeLimit'] = 6000;
within "C:\xampp\phpMyAdmin\config.inc.php" fileUpdated:
post_max_size=8M
topost_max_size=750M
(File: C:\xampp\php\php.ini)max_execution_time=500
tomax_execution_time=600
(File: C:\xampp\php\php.ini)max_input_time=60
tomax_input_time=5000
(File: C:\xampp\php\php.ini)memory_limit=128M
tomemory_limit=100M
(File: C:\xampp\php\php.ini)max_allowed_packet = 1M
tomax_allowed_packet = 200M
(File: C:\xampp\mysql\bin\my.ini)Finally, I've comment out
ContactForm::load('feedback')->setRecipients([$site_mail])->trustData()->save();
from the file "\core\profiles\standard\standard.profile" and it really worked while D8 in the final installation process (also mentioned in #30).Comment #39
npcoder CreditAttribution: npcoder as a volunteer commentedI am using Drupal Version 8.6.7. I got same error stated above.
Thanks @Senthil Kumar Kumaran, your suggestion helped.
File: core\profiles\standard\standard.profile
Comment #40
mas2405 CreditAttribution: mas2405 commentedFaced same issue as stated.
able to fix
Thanx @viraj7686 @Senthil Kumar Kumaran @greta_drupal
Comment #41
rahul_sankrit CreditAttribution: rahul_sankrit commentedRecommended php.ini settings:
The following settings are generally recommended as providing good performance:
XAMPP comes with PHP OPCache we just need to enable it. To enable the extension:
1.Open the file with editor: c:\xampp\php\php.ini
2.Add those above lines after [opcache]
4. Open php.ini and Add to resolve drupal installation issue
zend_extension = "C:\xampp\php\ext\php_opcache.dll"
3.Re-Start Apache
Here is the sample code:
Comment #42
pagodzik CreditAttribution: pagodzik commentedAnswer #39 helped me, without comment any lines:
https://www.drupal.org/project/drupal/issues/2780071#comment-12940740
Comment #43
rwilson0429 CreditAttribution: rwilson0429 commentedIf you are getting this error on install, I agree with the comment in #23. For now, ignore the error and just go to the site url and make whatever changes you need to make to site using the admin ui.
Comment #44
merauluka CreditAttribution: merauluka at Mediacurrent commentedHere is a patch that seems to resolve the issue for me. It adds an existence check around the feedback form. In standard installations, without custom config it should work just as before. But with custom config, such as when the feedback form was removed, it should no longer error out.
I wrote this against 8.7. But it should work for 8.6 also.
Comment #45
merauluka CreditAttribution: merauluka at Mediacurrent commentedTrying again with the correct root directory.
Comment #46
fehin CreditAttribution: fehin commented@merauluka, thank you! Your patch worked.
For anyone who needs similar help, I applied the patch using the instruction on this page:https://groups.drupal.org/node/518975
Comment #48
TechCarlo CreditAttribution: TechCarlo commentedI have faced this issue just now, search the internet for possible solutions, and got here.
I don't want to edit my php.ini file or apply a patch so I decided to solve this myself.
I solve this by editing this file C:\xampp\htdocs\drupalroot1\drupal-testsite\core\profiles\standard\standard.profile
Removing the function which has an error
This is the code to be removed(just cut it to your clipboard CTRL+X) :
after that, Reload the drupal intallation screen and voila, drupal is installed.
It will have and error though saying that standard_form_install_configure_submit function is missing. To fix that, put back the code we removed earlier back to the standard.profile file, save, reload the site, and error fixed.
Comment #49
samhaldia CreditAttribution: samhaldia as a volunteer commentedConfiguraing opcache as in #8 or follow https://www.php.net/manual/en/opcache.installation.php Reolved my issue
Comment #50
AmruthaKR CreditAttribution: AmruthaKR as a volunteer and commentedHi Team,
I am getting below error after following #30 and #37
Please help me to resolve the issue
Apigee Developer Portal Kickstart 8.8.6Installation tasks
Choose language(done)
Verify requirements(done)
Set up database(done)
Install site(done)
Configure Apigee Edge(done)
Configure site(active)
Install demo content
Error
The website encountered an unexpected error. Please try again later.
Error: Call to a member function setRecipients() on null in apigee_devportal_kickstart_form_install_configure_submit() (line 48 of profiles\contrib\apigee_devportal_kickstart\apigee_devportal_kickstart.profile).
apigee_devportal_kickstart_form_install_configure_submit(Array, Object)
call_user_func_array('apigee_devportal_kickstart_form_install_configure_submit', Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('install_configure_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm('Drupal\Core\Installer\Form\SiteConfigureForm', Object) (Line: 955)
install_get_form('Drupal\Core\Installer\Form\SiteConfigureForm', Array) (Line: 624)
install_run_task(Array, Array) (Line: 577)
install_run_tasks(Array, NULL) (Line: 117)
install_drupal(Object) (Line: 44)
Comment #52
sassafrass CreditAttribution: sassafrass commented@merauluka, thank you! Your patch worked.
Comment #55
newswatch CreditAttribution: newswatch commentedI am surprised that the problem is still there.
I got this error today with D 9.3.7.
Thankfully #37 worked for me.
Comment #57
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis will need an issue summary update. Specifically what steps to reproduce
Comment #59
smustgrave CreditAttribution: smustgrave at Mobomo commentedClosing as outdated. If still an issue please reopen updating the issue summary with steps to reproduce.
Thanks!