New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Undefined index: site_url" warning when installing mautic #9139
Comments
I have tried to debug this a bit:
It looks like https://github.com/mautic/mautic/blob/staging/app/bundles/InstallBundle/Command/InstallCommand.php#L499 should only be done with EMAIL_STEP, no? |
@gramakri Thanks for reporting this issue. Would like to make a PR for this issue to fix it? I can support you in case you need help |
@gramakri following up on this issue? do you mind contribute your code changes? |
@mabumusa1 Yes, I am interested in getting this fixed. I found this issue when packaging mautic 3 for Cloudron (just recently announced - https://forum.cloudron.io/topic/3165/mautic-3-major-update). I will see if we hit any other issues, so I can work on the items together. |
@gramakri thanks for the contribution, please submit a PR as soon as possible, hopefully, we can get it merged into the next release within a week |
Also pinging @madmath03 as I think we flagged up this warning when we were testing the install at CLI PR but decided to look into it at a later date. Bumping this to 3.1.2 - @gramakri if you'd like to work on this we'd need the PR to be submitted and tested before the 18th October. |
Indeed we saw this warning during tests of #7395 with @RCheesley but left it for later as this warning does not seem to impact the install process. As @gramakri mentioned, the final step could be moved into email step, but I think adding a new index for the final step might be more flexible. /**
* Class InstallService.
*/
class InstallService
{
const CHECK_STEP = 0;
const DOCTRINE_STEP = 1;
const USER_STEP = 2;
const EMAIL_STEP = 3;
const FINAL_STEP = 4;
//... /**
* CLI Command to install Mautic.
* Class InstallCommand.
*/
class InstallCommand extends ContainerAwareCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
{
$this
->setName('mautic:install')
->setDescription('Installs Mautic')
->setHelp('This command allows you to trigger the install process.')
->addArgument(
'site_url',
InputArgument::REQUIRED,
'Site URL.',
null
)
->addArgument(
'step',
InputArgument::OPTIONAL,
'Install process start index. 0 for requirements check, 1 for database, 2 for admin, 3 for configuration, 4 for final step. Each successful step will trigger the next until completion.',
0
)
//...
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
//...
switch ($step) {
//...
// no break
case InstallService::EMAIL_STEP:
$output->writeln($step.' - Email configuration step...');
$messages = $this->stepAction($installer, $allParams, $step);
if (is_array($messages) && !empty($messages)) {
$output->writeln('Errors in email configuration:');
$this->handleInstallerErrors($output, $messages);
$output->writeln('Install canceled');
return -$step;
}
// Keep on with next step
$step = InstallService::FINAL_STEP;
// no break
case InstallService::FINAL_STEP:
$output->writeln($step.' - Final step..');
$siteUrl = $allParams['site_url'];
$messages = $installer->createFinalConfigStep($siteUrl);
if (is_bool($messages) && true === $messages) {
$installer->finalMigrationStep();
} else {
$output->writeln('Errors in final migration:');
$this->handleInstallerErrors($output, $messages);
$output->writeln('Install canceled');
return -$step;
}
}
//... I can submit a PR for this if you're interested. |
@madmath03 I am happy to test it if you can submit a PR. Thanks! |
Please do submit a PR if you are able - would be great to deal with the notice rather than leave folk worrying that something isn't going to work/something broke! |
@RCheesley I already did the modification mentioned before but did not had the time to send PR yet. |
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
@madmath03 thanks for taking a look at that and making the PR! As this is technically a bugfix we could potentially consider it for 3.1.2 if we have enough testing etc :) |
Thanks for the PR @madmath03 , I will test this today. |
* develop-3x: (77 commits) update release_metadata.json Fix Travis Composer config Downgrade Composer to 1.10 Downgrade Composer to 1.10 Fix Travis merge conflict Fix PHP Notice: Trying to access array offset on value of type null Fix PHP notice on PHP 7.4 Revert Doctrine ORM update (see mautic#8772 for details) Update composer hash Revert "Fix RequestStack on LeadModel for tests" Fix RequestStack on LeadModel for tests Fix for Travis trusty Force MariaDB to 10.2.23 due to access denied Doctrine ORM to 2.7.1 because Travis MariaDB fails Downgrade ocramius/package-versions for PHP 7.2 Downgrade ocramius/proxy-manager to 2.2.3 composer update to refresh supported PHP versions in .lock Removing ext-imap from composer.json requirements as Mautic has internal handling that check if the ext is installed or not PageHelperTest fixed PHP Notice: Trying to access array offset on value of type null PHP Notice: Trying to access array offset on value of type null PHP Notice: Trying to access array offset on value of type bool Create PageHelper for common pagination calculations Fix PHP 7.4 warning Increasing max PHP version to PHP 7.4 Include PHP 7.2 Make CI 20 minutes faster php bin/console mautic:assets:generate content Update release_metadata.json update readme to add 3.1 branch EOL Add comment to clonedId Add clonedId to email entity Fix error dynamic content without variants Refactor method and add unit tests Typo URL validation improvement Fix Codecov in Travis Fix CS Added test case to cover bugfix replace getName() to getBlockPrefix() Fix removeDncForLead from contact preference page add solution based on evgu comment Remove z-index from focus preview to avoid issue without website Revert "Fix cache key contains reserved characters with API limiter" Focus preview even If website url doesn't exist Fixes a bug where mailer errors are not properly handled in campaign action Fix core integrations in windows Apply suggestion to add KERNEL_DIR Revert "Test preserving global state" Test preserving global state Isolate only problematic tests Optimize Travis config Test with Ubuntu Bionic 18.04 Check if things also work on Focal (20.04) Fix ReportBuilder PHP 7.3 warning Enable PHPUnit processIsolation Exclude all segment tests from LeadBundle Looks like this is the problematic test Another attempt to fix MariaDB on Travis Fix Travis for MariaDB Fix typo in PHPUnit config Update Travis to Xenial Fix parameters var name Fix install warnings from mautic#9139 ...
fixed in 3.1.2 |
Bug Description
When installing mautic there is a warning
Undefined index: site_url
Steps to reproduce
The text was updated successfully, but these errors were encountered: