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

Error message during subtheme generation is too vague #123

Open
maxplus opened this issue Jul 22, 2014 · 9 comments
Open

Error message during subtheme generation is too vague #123

maxplus opened this issue Jul 22, 2014 · 9 comments

Comments

@maxplus
Copy link

maxplus commented Jul 22, 2014

Guys,

I had a lot of problems fighting the error message in the theme settings "If you want Kalatheme to be able to use custom Bootstrap libraries or generate subthemes automatically please properly configure your webserver."

Now I found out with viewing the Kalatheme code, that you not only need 775 permissions for your themes and libraries folder, BUT YOU ALSO NEED TO ENABLE THE UPDATE MODULE!

I always disable the "update module" because it makes development much slower,...

Maybe something to write down as requirement in the WIKI? https://github.com/drupalprojects/kalatheme/wiki/Configuring-Server-for-Automatic-Kalatheme-installation

@pirog
Copy link
Contributor

pirog commented Jul 27, 2014

@labboy0276 i think there is a function in kalatheme which checks for the update module. we should make sure that we add something to this error message so the user knows they also need to turn the update module on to build subthemes. @katypool, we should add this into the documentation as well.

If you want Kalatheme to be able to use custom Bootstrap libraries or generate subthemes automatically please properly configure your webserver and turn on the updates module"

@labboy0276
Copy link

@pirog can we just make ti a dependency and call it a day?

@pirog
Copy link
Contributor

pirog commented Jul 28, 2014

@labboy0276 i don't know if we can make it a dependency of the whole project. there are a lot of reasons why someone might not want to turn on the update module and a lot of people won't even need it because they wont use a subtheme or custom library.

@reynoldsalec or @andrewmallis do you have any thoughts on this? maybe its not a big deal to just make it a dependency?

@jtjones23
Copy link

Running Kalatheme 7.x-3.0 on MAMP, PHP 5.3.27

I must be missing something. When I attempt to add the openmind Custom Bootstrap library, the template.php and main.css files are blank (except for comments at the top).

Any thoughts?

@pirog
Copy link
Contributor

pirog commented Jul 31, 2014

I think that is the expected behavior. They are just placeholder files for
your new sub theme.

On Wednesday, July 30, 2014, jtjones23 [email protected] wrote:

Running Kalatheme 7.x-3.0 on MAMP, PHP 5.3.27

I must be missing something. When I attempt to add the openmind Custom
Bootstrap library, the template.php and main.css files are blank (except
for comments at the top).

Any thoughts?


Reply to this email directly or view it on GitHub
#123 (comment)
.

Cheers,

Mike Pirog
Kalamuna
www.kalamuna.com

@soniktrooth
Copy link
Contributor

@jtjones23 I believe your issue relates to #203 and not to this issue.

@soniktrooth
Copy link
Contributor

I can confirm that kalatheme_backend_check() is checking whether the update module exists along with server related checks to see if we can do our stuff:

function kalatheme_backend_check() {
  // Verify FTP support
  $ftp_installed = extension_loaded('ftp');
  // Verify SSH support
  $ssh_installed = extension_loaded('ssh2');
  // Verify web server write permissions
  $install_permissions = kalatheme_has_write_access();
  // Verify update module is enabled
  $updates_module = module_exists('update');

  return (($ftp_installed || $ssh_installed || $install_permissions) && $updates_module);
}

In kalatheme_backend_check_form() line 91 kalatheme_backend_check() is being used and then error messages about webserver config are being output if it returns FALSE. This seems far too vague a message for just the webserver related stuff let alone the fact that this message could fire in the event that everything is fine except for the fact that the update module is off.

Here's some questions I have:

  1. Why do we need update module to add a subtheme in the first place? From digging around the code it seems that maybe we're extending the core update class to build the subtheme somehow? @pirog can you confirm that this is the case? My OO PHP is a little hazy.
  2. It's possible to turn modules on and off with code. What are the downsides to turning update module on and off (if it was previously off) when we run the subtheme generation?
  3. How can we ammend kalatheme_backend_check() so that we are outputting more informative messages to the user so they know what the actual problem is in order that they can be better equipped to debug their sites.

@soniktrooth
Copy link
Contributor

So, I just noticed also that these messages are often printed out as part of the form itself rather than using drupal_set_message() so perhaps that could help us solve the issue of vague messages.

soniktrooth pushed a commit that referenced this issue Sep 14, 2015
@andrewmallis andrewmallis changed the title If you want Kalatheme to be able to use custom Bootstrap libraries or generate subthemes automatically please properly configure your webserver. Error message during subtheme generation is too vague Sep 17, 2015
@andrewmallis
Copy link
Member

I don't believe a theme can enable/disable modules…

Declaring update module as a dependency is poor form; it is a memory hog on production during each cron run.

The help text message in #205 addresses what I believe the scope of this issue, which I have retitled.

The wiki page has also been updated.

Moving this to QA

soniktrooth pushed a commit that referenced this issue Apr 19, 2016
soniktrooth pushed a commit that referenced this issue May 11, 2016
@soniktrooth soniktrooth modified the milestones: 7.x-3.3, 7.x-3.2 May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants