5

I have just upgrade magento 2.2.4 to 2.2.6 and noticed that web setup wizard not display.

It was displayed in 2.2.4 found that already reported here https://github.com/magento/magento2/issues/7623

Does anyone have the idea what if I supposed to do to re-appear this tab? I think Magento will consider it in next release.

2
  • try to set permission to magento directories and then check. Oct 20, 2018 at 6:46
  • I set permission like find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && find ./var -type d -exec chmod 777 {} \; && find ./pub/media -type d -exec chmod 777 {} \; && find ./pub/static -type d -exec chmod 777 {} \; && chmod 777 ./app/etc && chmod 644 ./app/etc/*.xml but seems nothing happened
    – Hitesh
    Oct 20, 2018 at 6:51

2 Answers 2

4

I just got a solution from this link

So I am describing what I supposed to be followed

1) First I followed @Rohan Hapani's solution like hiding below method

/**
 * Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
 *
 * @param Builder $subject
 * @param Menu $menu
 * @return Menu
 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 * @since 100.1.0
 */
public function afterGetResult(Builder $subject, Menu $menu)
{
    if ($this->docRootLocator->isPub()) {
        $menu->remove('Magento_Backend::setup_wizard'); //You can comment this line / function to show it.
    }
    return $menu;
}

2) After that, I followed this answer

To replace

location ~* ^/setup($|/) {
....
}

with

location /setup {
    root $MAGE_ROOT;
    location ~ ^/setup/index.php {

        ### This fixes the problem:
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        ################################

        fastcgi_pass   fastcgi_backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ ^/setup/(?!pub/). {
        deny all;
    }

    location ~ ^/setup/pub/ {
        add_header X-Frame-Options "SAMEORIGIN";
    }
}

into nginx.conf.sample of Magento root folder

run below command

sudo service nginx restart && sudo service php7.1-fpm restart

php bin/magento cache:clean && php bin/magento cache:flush

Hope other can get help from this post if they faced same problem.

NOTE: as this is the temporary solution until Magento fix in next release(reference issue link: https://github.com/magento/magento2/issues/7623)

Thanks.

1

It's come from /vendor/magento/module-backend/Model/Setup/MenuBuilder.php file :

/**
 * Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified.
 *
 * @param Builder $subject
 * @param Menu $menu
 * @return Menu
 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 * @since 100.1.0
 */
public function afterGetResult(Builder $subject, Menu $menu)
{
    if ($this->docRootLocator->isPub()) {
        $menu->remove('Magento_Backend::setup_wizard'); //You can comment this line / function to show it.
    }
    return $menu;
}

But, as per my view it's just temporary solution.

So, try to follow this way.

Go to public_html/app/etc/env.php and change the following code from

'session' => [
'save' => 'db'

to

'session' => [
'save' => 'files'

EDIT : I think in your magento, update folder not create.

Don't forget that you must have 2 doc roots for your website and setup.

## Set Magento root folder
set $MAGE_ROOT /var/www/html;
## Set main public directory /pub
root $MAGE_ROOT/pub;

...

location ~ ^/(setup|update) {
    root $MAGE_ROOT;

Reference

Hope, it may be helpful for you.

9
  • In my case session already saved into files like as you mentioned
    – Hitesh
    Oct 20, 2018 at 6:54
  • okay. You can comment that function as i mention that it's temporary solution. Oct 20, 2018 at 6:55
  • can you please let me know what's the pros cons if we override afterGetResult method and remove $menu->remove('Magento_Backend::setup_wizard'); line I just hide $menu->remove('Magento_Backend::setup_wizard'); line tab is appear but after click on tab it seems as a blank page
    – Hitesh
    Oct 20, 2018 at 6:56
  • Check my updated answer. Oct 20, 2018 at 7:21
  • I have added your edited changes into nginx.conf.sample file, but still it's not working. I am using nginx server. by the way update folder is already created for me
    – Hitesh
    Oct 20, 2018 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.