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

Theming broken after trying to enabling a second theme #31134

Closed
patrickjahns opened this issue Apr 16, 2018 · 15 comments
Closed

Theming broken after trying to enabling a second theme #31134

patrickjahns opened this issue Apr 16, 2018 · 15 comments
Assignees
Labels
Milestone

Comments

@patrickjahns
Copy link
Contributor

patrickjahns commented Apr 16, 2018

After trying to activity another theme - ownCloud behaves strange

IMPORTANT NOTE this only broken when templateeditor is enabled

Steps to reproduce

Pre-Conidtion:

Have templateeditor 0.3 installed + enabled

First scenario - broken general section

  1. Take ownCloud 10.0.8RC1 with enterprise theme
  2. Go to Apps -> try to enable theme-example -> (Error Message theme-example can't be enabled until theme-enterprise is disabled. should be shown )
  3. Go browse to general section and see it blank:
    image

second scenario - "split theme brain"

  1. Take ownCloud 10.0.8RC1 with enterprise theme
  2. Go to Apps -> try to enable theme-example -> (Error Message theme-example can't be enabled until theme-enterprise is disabled. should be shown )
  3. Disable theme-enterprise
  4. browse to general section and see theme-example being used
    image

Expected behaviour

General section works as before trying to enable the theme.

Actual behaviour

broken general section

image

split theme

image

Logs

ownCloud log (data/owncloud.log)

{"reqId":"42azotaIYRMVldUbjbTm","level":3,"time":"2018-04-16T09:10:30+00:00","remoteAddr":"172.18.0.1","user":"admin","app":"core","method":"POST","url":"\/index.php\/settings\/ajax\/enableapp.php","message":"theme-example can't be enabled until theme-enterprise is disabled."}
{"reqId":"NsCi0SJGdiOh1fccNUTJ","level":3,"time":"2018-04-16T09:10:38+00:00","remoteAddr":"172.18.0.1","user":"admin","app":"PHP","method":"GET","url":"\/settings\/admin?sectionid=general","message":"Cannot declare class OC_Theme, because the name is already in use at \/var\/www\/owncloud\/apps\/theme-example\/defaults.php#21"}
{"reqId":"TYevcho3daWp4Axqdu9C","level":3,"time":"2018-04-16T09:10:42+00:00","remoteAddr":"172.18.0.1","user":"admin","app":"PHP","method":"GET","url":"\/settings\/admin?sectionid=general","message":"Cannot declare class OC_Theme, because the name is already in use at \/var\/www\/owncloud\/apps\/theme-example\/defaults.php#21"}
{"reqId":"QqRiDA4QclY51j3tJReh","level":3,"time":"2018-04-16T09:11:13+00:00","remoteAddr":"172.18.0.1","user":"admin","app":"PHP","method":"GET","url":"\/settings\/admin?sectionid=general","message":"Cannot declare class OC_Theme, because the name is already in use at \/var\/www\/owncloud\/apps\/theme-example\/defaults.php#21"}
{"reqId":"tVkTCLg9u4BRGGd7msPx","level":3,"time":"2018-04-16T09:14:20+00:00","remoteAddr":"172.18.0.1","user":"admin","app":"PHP","method":"GET","url":"\/settings\/admin?sectionid=general","message":"Cannot declare class OC_Theme, because the name is already in use at \/var\/www\/owncloud\/apps\/theme-example\/defaults.php#21"}
@pmaier1 pmaier1 added this to the QA milestone Apr 16, 2018
@pmaier1 pmaier1 added the p1-urgent Critical issue, need to consider hotfix with just that issue label Apr 16, 2018
@pmaier1
Copy link
Contributor

pmaier1 commented Apr 16, 2018

This should be fixed for 10.0.8 final if possible.

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #13402 (... broken), #3209 (Theming), #30887 ([theme-example] Enable only for specific groups ???), #30948 ([Stable10] Protect themes against enabling for groups), and #3645 (Theme Backup).

@pmaier1 pmaier1 added p2-high Escalation, on top of current planning, release blocker and removed p1-urgent Critical issue, need to consider hotfix with just that issue labels Apr 16, 2018
@tomneedham
Copy link
Contributor

@VicDeo ?

@VicDeo
Copy link
Member

VicDeo commented Apr 16, 2018

@patrickjahns is any kind of cache enabled?

@VicDeo
Copy link
Member

VicDeo commented Apr 16, 2018

please disregard as it's not related to caching.
wow... it's a win-win combination :)
template editor iterates through the themes provided by the core OC\ThemeThemeService
https://github.com/owncloud/core/blob/master/lib/private/Theme/ThemeService.php#L136 actually loads and applies a theme
so if there is no active theme (theme-enterprise is disabled) the latest available theme will be applied to the templateeditor page.

and another issue that we just can't load two app-themes at the same time due to the file defaults.php that contains the class OC_Theme...

@VicDeo
Copy link
Member

VicDeo commented Apr 16, 2018

#31151

@PVince81
Copy link
Contributor

Is there a workaround like letting the admin disable second theme on the CLI ?

@PVince81
Copy link
Contributor

@pmaier1 @felixboehm let's move this to 10.0.9, there's a workaround and the PR isn't ready for merge

@pmaier1
Copy link
Contributor

pmaier1 commented Apr 17, 2018

Yes, ok 👍

@pmaier1 pmaier1 modified the milestones: QA, development Apr 17, 2018
@pmaier1
Copy link
Contributor

pmaier1 commented Apr 19, 2018

workaround not working
active theme is not applied on settings - admin - general page

@PVince81
Copy link
Contributor

@pmaier1 can you disable and re-enable the main theme app and confirm you're testing on 10.0.8 RC3 ?

@PVince81
Copy link
Contributor

or disable the template editor

need to make sure that even if disabled, that there is only one theme app existing in the apps folder

@PVince81 PVince81 added p3-medium Normal priority and removed p2-high Escalation, on top of current planning, release blocker labels Apr 23, 2018
@PVince81
Copy link
Contributor

there's a workaround -> p3

@PVince81
Copy link
Contributor

PR was merged, closing. (backport required)

@PVince81 PVince81 removed this from the development milestone Jun 13, 2018
@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants