Getting the error "Stylesheet folder doesn't exist."

I have created a "css" folder and i've tried putting it in [sites/all/modules/fpss] as well as [sites/all/modules/fpss/fpss]

The red warning text will not change on refresh.

CommentFileSizeAuthor
#4 Picture 1(2).png267.98 KBDjC4
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DjC4’s picture

Status: Postponed (maintainer needs more info) » Needs review

I think the problem is within this sction of code within fpss.module starting on line 221.

engines path and templates path are all declared using drupal_get_path. but then filepath is used to setup the stylesheet_folder.

$filepath = file_directory_path()

is filepath really "stylesheet_path". I'm confused as to how this section is laid out.

Anyone else not able to get their CSS folder detected?


 $enginespath = drupal_get_path('module','fpss').'/fpss/'.variable_get('fpss_enginesfolder','engines');
  if (file_exists($enginespath)) {
    $engines_exists = t('<span style="color:#0c0;font-weight:bold;">Engines folder exists</span>.');
  }else {
    $engines_exists = t('<span style="color:#c00;font-weight:bold;">Engines folder doesn\'t exist</span>.');
  }
  $templatespath = drupal_get_path('module','fpss').'/fpss/'.variable_get('fpss_templatesfolder','templates');
  if (file_exists($templatespath)) {
    $templates_exists = t('<span style="color:#0c0;font-weight:bold;">Templates folder exists</span>.');
  }else {
    $templates_exists = t('<span style="color:#c00;font-weight:bold;">Templates folder doesn\'t exist</span>.');
  }
  $form['folders']['fpss_enginesfolder'] = array(
    '#type' => 'textfield',
    '#title' => t('Engines Folder'),
    '#default_value' => variable_get('fpss_enginesfolder','engines'),
    '#description' => '<p>'.t('Name of the engines folder. !exists',array('!exists' => $engines_exists)),
  );
  $form['folders']['fpss_templatesfolder'] = array(
    '#type' => 'textfield',
    '#title' => t('Templates Folder'),
    '#default_value' => variable_get('fpss_templatesfolder','templates'),
    '#description' => '<p>'.t('Name of the templates folder. !exists',array('!exists' => $templates_exists)),
  );
  $filepath = file_directory_path();
  $stylesheetfolder = variable_get('fpss_stylesheetfolder', 'css');
  if (file_exists(file_directory_path() . '/' .$stylesheetfolder)) {
    $stylesheet_exists = t('<span style="color:#0c0;font-weight:bold;">Stylesheet folder exists</span>.');
  }else {
    $stylesheet_exists = t('<span style="color:#c00;font-weight:bold;">Stylesheet folder doesn\'t exist</span>.');

wilco’s picture

Yup. I've corrected this and it should now work in the new patched module.

DjC4’s picture

Awesome! Thanks for the patch. Will begin testing new code.

DjC4’s picture

FileSize
267.98 KB

Tried the new code and I'm still getting the same error. I'm going to keep playing around it. I attached a screen shot just to make sure my folder hierarchy is correct.

wilco’s picture

I think I see the problem... you'll note the error message in red next to the CSS path. This means the path is not set correctly. I'll have to clean up those instructions better. Basically, the CSS folder must be somewhere other than in the FPSS folder and preferrably not in the files path. For some reason, and I have as of yet to resolve, if the CSS exists in the site folder and you clear the cache, it wipes those files and then each CSS relating to a FPSS template has to be rebuilt.

The module also has some pretty terrible implementation and interface issues that need to be resolved. It was a conversion from Drupal 5 to D6 which dragged with it some nasty relics of code.

Anyway, I'm getting away from my point. Try creating a CSS folder in your theme and filling in the path properly. For instance:

if you have a theme in the sites folder of you drupal installation, it might read something like sites/domain.name/themes/theme_name/css.

Does that make any sense?

wilco’s picture

Category: bug » support
Status: Needs review » Active

I'm changing the condition of this problem as the code has been fixed in the latest beta and the code provided is not required. Thank you for your input though. Much appreciated.

-wil

DjC4’s picture

Yup works now. Good thing I put up a screen shot ahahaha. Thanks for your help Wilco.

wilco’s picture

Status: Active » Fixed

Great. If you have any more questions, don't hesitate to ask!

psicomante’s picture

i have the same problem and using the last stable versione. Thanks for any help.

wilco’s picture

If you are having the same problem, read over the information I provided DjC4 and see if that helps. Otherwise, there really isn't much I can do for you unless you describe the problem.

psicomante’s picture

@wilco
I saw the code and i found the place where i should put the folder. I didn't understand that it should be on root.

Thanks for this amazing module!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

cmacuna28’s picture

Hey,

I've followed the instructions for creating the right path and have linked it to my theme's css folder (sites/all/themes/colourise/css) and the red message has gone away. I am really new at css, so is there anything else I need to add in this css folder besides the css files already associated with the theme I am using? The reason I ask this is because when I create a slide show this message appears: "The selected file /private/tmp/fileOlVY4s could not be uploaded, because the destination sites/all/themes/colourise/css/fpss-FSD.css is not properly configured."

and "FPSS stylesheet failed."

Any help is much appreciated,
Christian

stillnikaien’s picture

were can we find this patch?

JoNaHLoMu’s picture

the right path
sites/all/themes/[YourTheme]/css

stillnikaien’s picture

not the path! the patch to fix the module. In post #2 wilco said "Yup. I've corrected this and it should now work in the new patched module." but were is this patch he's talking about?

rollingnet’s picture

nicolasM’s picture

That description helps me to display fpss : http://tips-linux.net/en/content/frontpage-slideshow-drupal

jbfelix’s picture

in fpss.module line 246:
replace:
variable_get('fpss_stylesheetfolder', 'css');
by
$stylesheetfolder = drupal_get_path('module','fpss').'/fpss/'.variable_get('fpss_stylesheetfolder', 'css');