Spamicide use css file stored in public://spamicide to hide spamicide field in forms.

I have an issue, my css file and spamicide directory wasn't created (my files and directories rights are good for writing). I think this issue comes from fact that i never submit spamicide admin page. But it's not the main case of my issue.

So reading module code, i don't understand interest using css file and not just inline css drupal_add_css($css, 'inline'). Using inline css, we don't have file existing tests anymore and no writing issues.

I'll post patch soon

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lipcpro’s picture

Status: Active » Postponed (maintainer needs more info)

Inline css is not best practices. There must be something else that is the problem.

GoZ’s picture

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

Do you have a source which explain inline css is not best practice ?
It's best practice when you have a lot of css properties to add.
Since you have only one dynamique line (with variable $form_field), your trick is to generate multiple files, one by field. With this trick, we have multiple css files, multiple files existing tests and you have to deal with create and delete files (heavy).

More than inline or file css question, css is added with drupal_add_css on form_alter. Best practice is to add css with #attached form property http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht....

This patch is part of the #1day1patch initiative.

GoZ’s picture

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

bot needs review

lipcpro’s picture

Status: Postponed (maintainer needs more info) » Postponed

"Best practice is to add css with #attached form property http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...."
I do add css in this fashion, which is NOT inline. If you could find out why the module can't create the spamicide directory that would solve your problem. Are you using a private file system?

GoZ’s picture

I think files are not generated because i have no spamicide directory in files directory (a drupal build thanks to a database backup and drupal files without sites/default/files). Since i don't launch .install on my instance, i guess spamicide directory never been created.

I don't understand why inline css is not an option while this is lighter than dealing with files.

lipcpro’s picture

Status: Postponed » Closed (works as designed)