Skip to content

Conversation

@schiessle
Copy link
Contributor

An example how #17959 could be solved.

cc @CaptionF @jancborchardt @cmonteroluque @MTRichards

@schiessle schiessle added this to the 8.2-current milestone Jul 29, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be in line with the other variables, shouldn’t it be $themeKnowledgeBaseUrl?

Also, might be simpler to say themeHelpUrl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure... just copy&pasted it from default.php, will update it once Jenkins finished

@karlitschek
Copy link
Contributor

👍

@karlitschek
Copy link
Contributor

@schiesbn cloud we also make it a config.php option? would make stuff easier.
We also need to backport this. (unfortunately)

@schiessle
Copy link
Contributor Author

@karlitschek We could also implement it as a config.php option, sure. But I think this is the cleaner solution. Even if we want to get this in early, I think we should still try to have sustainable solution. I think it would be quite confusing if some stuff would be set in config.php and other (quite similar) stuff in the theme.

This changes are still small and quite isolated, so I think the risk that the backport breaks something isn't really high.

@karlitschek
Copy link
Contributor

@schiesbn Sure. Both work for me. @MTRichards what do you think?

@MTRichards
Copy link
Contributor

My only concern with making this part of the theme is that it is relatively complicated (setting up a theme) if all you want to do is change the URL for the help menu. I do have this as a feature request from another customer as well, though they do use the theme approach.

What else is configurable as a theme like this?

@ghost
Copy link

ghost commented Jul 29, 2015

🚀 Test PASSed.🚀
chuck

@schiessle
Copy link
Contributor Author

@MTRichards as you can see at the following link a lot of URLs to documentation, sync clients, etc. are defined in the theme as well as ownCloud name, slogan, mail footers,... https://github.com/owncloud/core/pull/17961/files#diff-66338aea9c5877c3368c5c7b0ed484ebR36 That's why I think that this would be the logical place for the knowledge url.

The customer doesn't need to create a complete new theme if he want to change the knowledge url. He just need to edit the defaults.php from the theme he already use and set the baseKnowledgeUrl like done here: https://github.com/owncloud/core/blob/make_knowledgebase_configurable/themes/example/defaults.php#L43

@schiessle schiessle force-pushed the make_knowledgebase_configurable branch from 5641bca to 8fb8905 Compare July 29, 2015 17:35
@scrutinizer-notifier
Copy link

A new inspection was created.

@MTRichards
Copy link
Contributor

Sold! Thanks for explaining Bjoern.
Of course, we need to document it really well. @carlaschroder

@ghost
Copy link

ghost commented Jul 29, 2015

🚀 Test PASSed.🚀
chuck

@schiessle
Copy link
Contributor Author

second reviewer needed... @LukasReschke @MorrisJobke @PVince81 maybe? Thanks!

@LukasReschke
Copy link
Member

👍

DeepDiver1975 added a commit that referenced this pull request Aug 5, 2015
@DeepDiver1975 DeepDiver1975 merged commit a70f145 into master Aug 5, 2015
@DeepDiver1975 DeepDiver1975 deleted the make_knowledgebase_configurable branch August 5, 2015 09:54
@carlaschroder carlaschroder self-assigned this Aug 5, 2015
@RobinMcCorkell
Copy link
Member

ERM, this may have just broken some apps. Because URLGenerator is instantiated in OC_Defaults, and it requires a Router, app routes are now loaded before the actual app is loaded... This caused an issue in files_external where appinfo/app.php registers some CLASSPATHs (yeah yeah I know, it's legacy code ok?), which are needed in appinfo/routes.php when a route is registered. Since they aren't available at that point, errors start getting thrown.

Note that this only occurred on my WIP refactor of files_external, I'm not sure if there are any apps that will display these issues. But it's still bad that the app routes are getting loaded before the app itself.

Relevant backtrace from when I noticed it (was unit testing at the time):

PHP  10. OC::init() /srv/local/owncloud/core/lib/base.php:1125
PHP  11. OC_Util::checkServer() /srv/local/owncloud/core/lib/base.php:608
PHP  12. OC_Defaults->__construct() /srv/local/owncloud/core/lib/private/util.php:571
PHP  13. OC\URLGenerator->linkToRoute() /srv/local/owncloud/core/lib/private/defaults.php:69
PHP  14. OC\Route\CachingRouter->generate() /srv/local/owncloud/core/lib/private/urlgenerator.php:65
PHP  15. OC\Route\Router->generate() /srv/local/owncloud/core/lib/private/route/cachingrouter.php:53
PHP  16. OC\Route\Router->loadRoutes() /srv/local/owncloud/core/lib/private/route/router.php:305
PHP  17. OC\Route\Router->requireRouteFile() /srv/local/owncloud/core/lib/private/route/router.php:155
PHP  18. include_once() /srv/local/owncloud/core/lib/private/route/router.php:315

@PVince81
Copy link
Contributor

PVince81 commented Aug 6, 2015

@Xenopathic can you raise a regression ticket so this doesn't get lost ? Thanks.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.