Skip to content
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

Issue in Changing theme #14295

Closed
Piyush3079 opened this Issue May 15, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@Piyush3079
Copy link
Contributor

Piyush3079 commented May 15, 2018

Steps to reproduce

  1. Login to PMA
  2. Select theme Metro.
  3. Now try to change theme to pmahomme

Expected behaviour

Theme must change from metro to pmahomme

Actual behaviour

Theme will not change and remains metro only.

Client configuration

Browser:
chome 62

Operating system:
Ubuntu 17.10

@williamdes

This comment has been minimized.

Copy link
Member

williamdes commented May 16, 2018

Possible to go back to pmahomme following Metro > Original > pmahomme

@Piyush3079

This comment has been minimized.

Copy link
Contributor Author

Piyush3079 commented May 16, 2018

But it should also work with Metro > pmahomme.

@williamdes

This comment has been minimized.

Copy link
Member

williamdes commented May 16, 2018

Yes
Found out that the cookie pma_theme is removed when selecting pmahomme.
Maybe:

phpmyadmin/prefs_manage.php

Lines 150 to 159 in 17bf8b7

// check for ThemeDefault
$params = array();
$tmanager = ThemeManager::getInstance();
if (isset($config['ThemeDefault'])
&& $tmanager->theme->getId() != $config['ThemeDefault']
&& $tmanager->checkTheme($config['ThemeDefault'])
) {
$tmanager->setActiveTheme($config['ThemeDefault']);
$tmanager->setThemeCookie();
}

@nulll-pointer

This comment has been minimized.

Copy link
Contributor

nulll-pointer commented May 27, 2018

I tried printing the name of the theme it sets in the function setActivetheme in thememanager.php.
Looks like it sets the theme to pmahomme but sets it again to metro, which means that the function setActiveTheme is called again, I'm trying to find out how.

@williamdes

This comment has been minimized.

Copy link
Member

williamdes commented Jun 2, 2018

This issue depends on $cfg['ThemeDefault'].

$cfg['ThemeDefault'] = 'original';

Working on PR

There is something strange with cookie deletion, default theme, pma storage database.

        $GLOBALS['PMA_Config']->setCookie(
            $this->getThemeCookieName(),
            $this->theme->id,
            $this->theme_default
        );

williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Jun 3, 2018

Fix for phpmyadmin#14295
Fixes: phpmyadmin#14295
Signed-off-by: William Desportes <williamdes@wdes.fr>

mauriciofauth added a commit that referenced this issue Jun 13, 2018

@mauriciofauth mauriciofauth self-assigned this Jun 13, 2018

@mauriciofauth mauriciofauth added this to the 5.0.0 milestone Jun 13, 2018

@mauriciofauth mauriciofauth modified the milestones: 5.0.0, 4.8.4 Aug 28, 2018

mauriciofauth added a commit that referenced this issue Aug 28, 2018

Fix for #14295
Fixes: #14295
Signed-off-by: William Desportes <williamdes@wdes.fr>
(cherry picked from commit a87bf74)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

mauriciofauth added a commit that referenced this issue Aug 28, 2018

Add ChangeLog entry for #14295
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

ibennetch added a commit that referenced this issue Dec 11, 2018

Fix for #14295
Fixes: #14295
Signed-off-by: William Desportes <williamdes@wdes.fr>
(cherry picked from commit a87bf74)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>

ibennetch added a commit that referenced this issue Dec 11, 2018

Add ChangeLog entry for #14295
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.