drupalprojects / kalatheme

Mirror of http://drupal.org/project/kalatheme provided by hubdrop.
http://hubdrop.org/project/kalatheme
GNU General Public License v2.0
22 stars 29 forks source link

Error message during subtheme generation is too vague #123

Open maxplus opened 10 years ago

maxplus commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

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

pirog commented 10 years ago

@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 commented 10 years ago

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 commented 10 years ago

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

On Wednesday, July 30, 2014, jtjones23 notifications@github.com 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 https://github.com/drupalprojects/kalatheme/issues/123#issuecomment-50707821 .

Cheers,

Mike Pirog Kalamuna www.kalamuna.com

soniktrooth commented 9 years ago

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

soniktrooth commented 9 years ago

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 commented 9 years ago

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.

andrewmallis commented 8 years ago

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