CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Invalid XHTML in Profiles, ...
Pages: [1]

Author Topic: Invalid XHTML in Profiles, ...  (Read 1050 times)

ceford

  • I’m new here
  • *
  • Posts: 20
  • Karma: 2
Invalid XHTML in Profiles, ...
November 01, 2009, 10:21:55 am
I routinely validate my web pages after development work - and today found a bunch of link and javascript tags in the body of a Profile form page rather than the head. I spent ages trying to find where I had blundered - deleting caches and even reading through the code (without finding where the stuff was coming from).  I only found one similar comment in the Forums and it seems to have gone unanswered. As my Profile is a Joomla front-end form created via a Joomla menu I was a bit stumped. It turns out that the CiviCRM Joomla Demo site is the same: http://joomla.demo.civicrm.org/ (the Membership Signup Form) and so is the backend. The Drupal demo is not much better. And even the CiviCRM home page has some optional IE css markup between head and body tags.

The Profile form seems to work so maybe I am just too neurotic. But does it work on browsers I don't have, and will it work tomorrow? It is a sensitive issue because I just lambasted another piece of software for producing hopelessly invalid markup.

Cliff

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Invalid XHTML in Profiles, ...
November 01, 2009, 10:50:50 am

integrating with a cms has some limitations, and we dont control the html exactly. hence u see js / css in the body. We can do a better job with drupal since it exposed a "hook" to add stuff to the head section of the html body

it does seem to work and not bug reports on this (as yet :). however if this is important to you, please consider investigating and figuring out how to fix it in generic manner that works across all joomla templates/configs

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Invalid XHTML in Profiles, ...
November 01, 2009, 07:16:16 pm
It's my understanding that functionally there's no harm in having the javascript/css inserted in the body tag -- it's just not the efficient or optimized way to do things, and thus does not validate.

This has been something I've wondered about whether we could improve, but because Civi works the way it is, has been low on the list.

Joomla does enable insertion of content into the head tag via a system plugin (Joomla's equivalent of Drupal's hook system). Lobo, does Civi load the same set of java/css on every page? Or are there differences on a per-page basis? I've never taken a close look at comparing pages. If the set is the same, we probably could insert it pretty easily using a plugin.

Maybe we can talk about it more at the Dec. Dev Camp.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Invalid XHTML in Profiles, ...
November 01, 2009, 07:46:00 pm

hey brian:

yes, we load the same set of js/css for all civicrm pages

check:

templates/CRM/common/joomla.tpl

and

drupal/civicrm.module, function civicrm_html_head

we basically insert the contents of that function in the head snippet in drupal

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Invalid XHTML in Profiles, ...

This forum was archived on 2017-11-26.