15 replies [Last post]
mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi all,

Am a web-designer, and i am employed at a place where we do joomla! based sites. As you might be knowing that joomla is a beautiful cms, where you can add various third party modules and components. Now here's the catch, the problem is every time i install some module, the validator seems to find some query in it. and joomla has a WYSISYG editor for adding text from the back-end. the prob is when someone uses the characters "&", the validator gives a problem.
For example, i have a translation module installed, but the images didnt have the "alt" tag, and that is where the error came, so do i have to make the changes each time around?
Cause i am sure that there's nothing, in my index that is worth taking a objection for!

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 1 year 1 week ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

You are running across one

You are running across one of the things that makes CMS systems, in general, non-starters for me.

But if you want to use CSS to style and layout your site you really have no choice but to make the code valid. CSS rules are only defined for valid html, and for non-valid html there is no standard and no basis on which to expect browsers to follow any particular rule in any particular way.

Use of good alt tags is important for accessibility. There are lots of visitors to your site that won't have graphics browsers. One major visitor that won't have a visual browser is any search engine spider. So good semantic valid code helps with your search engine visibility.

And of course there's the question of pride. Are you a pro? Does a real pro settle for second rate code?

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi, i will put up my link

hi,
i will put up my link and you check it out. as you will see there is no problem with my index as well as css. all the errors are coming from the modules that i have installed.

www.tekdi.net/tws

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 5 years 40 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

mihirc wrote:As you might be

mihirc wrote:
As you might be knowing that joomla is a beautiful cms

I personally think joomla is a piece of crap that puts out code as bad as Front Page.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

I'm afraid I have to agree

I'm afraid I have to agree with Wolfie it isn't really the best at outputing clean semantic code, for that you need Wordpress or Drupal, both tableless where it matters.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Guys, each person, different

Guys, each person, different thought anyways. can you guys think of a way to rectify these? cause after this web-site, i will be just converting templates our designers make... for that i need to make templates that are 100% validated....

do you guys need anything to test these? let me know...

mihir.Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It's hard to help as this is

It's hard to help as this is a cms issue, we don't know how the img tags are generated or why they are generated without alt attributes.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Thats fine, so if you now

Thats fine, so if you now validate the site, you will notice that there no prob with the index or my css. its the addition modules(widgets) that are added to the site. so if i make a template with "lorum ipsum" and hard coded menus, i think my site will be 100% validated.

Anyways, if you can think of some way, let me know...

Thanks,
mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Link? If modules generate

Link?

If modules generate img tags then it would be the modules that would need to edited to correct the lack of alt attributes but they may prove harder than it sounds where would the text for the alt attribute arrive from?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hi, basically each module

hi,

basically each module has 2 files and 1 folder, one module.html.php and the other an xml and an images folder. so basically all the images's paths, text's , positioning and all comes from the html.php . so basically the images in the translation module that i had installed didnt have the alt tags added them.
The second prob is a module of transmenu(multi-level) drop down menu. what is happening is, since its position is defined outside the head tag, its script and other things are getting an error, that is a big issue...

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

If that transmenu thingy is

If that transmenu thingy is placing link tags and style tags in the body then something has gone badly wrong and needs to be corrected as these are unacceptable errors, but I simply couldn't say what was happening as all there is to go on is that function call to some mosloadmodule('topmenu') or something I dont know how on earth that breaks down or why it would be calling link and style tags into the body.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

Hi, Basically

Hi,

Basically MosloadModules{topmenu} or MosloadModules{left}or MosloadModules{advert1} or MosloadModules{advert2} or MosMainBody{} are php tags that are defined in the index. in the backend of joomla you publish the relative modules to that specific position, so basically the topmenu thing you see is pulling a menu that is published in the topmenu.

Same way, the TransMenu thingy is published in a position of topmenu...
So it is happening like that...

i am trying to hack that module core files so that in some way it gets included in the index head. If anybody has any idea how to do it... please contribute...

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Good luck with hacking the

Good luck with hacking the module.

I have to say that I have just viewed OVER a DOZEN Joomla show sites and NOT one of them came close to validating, ALL were riddled with countless coding errors.

I also paid attention to the modules and where used the transmenu and another fslanguage(sic) both repeatedly committed the same error of placing script and style tags in the body.

The only logical conclusion that can be drawn is that Joomla simply does not have a proper Module developers API leaving it up to them how they call up their required files?

Regardless It just further cements my opinion that Joomla is in fact an absolute nonsense as far as CMS go and I wouldn't go near it with a barge pole, it's not a coders cms it's for people who don't code and value style over substance?

Sorry I mean this as absolutely no reflection on yourself, and I'm not attempting to insult you in some roundabout way , it's just that I hate non standards c**p, sloppy implementation, when other cms can produce consistent valid code with robust module api such as Drupal and Wordpress or lesser beasts such as cms made simple or textpattern.

Joomla was meant to have been a solution (fork) to Mambo and it's woes, it certainly doesn't appear to be!

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

As I said in some other

As I said in some other post, each person has his own say.

But as you said i also have seen many sites, totally hopeless at validation!! so currently my own site rocks to say. and the hack has worked and now it is validating...

so my site is almost validated now, the only fact is that since the text is coming from backend, and if some1 adds "&" then again there will be an error, and am not gonna be able to modify each time they do so.

So Currently my Template is 100% validated....... My site might not be Laughing out loud

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 47 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Well done for getting that

Well done for getting that done as it seems a lot of Joomalas have ignored this module problem but really the Joomla developers should address it :shrug:

As likewise they should with the user submitted text which needs to be run through filters as Drupal does.

I'm not sure how possible it is but you need to trap that user textarea submission and if possible run it through something like the htmlspecialchar function to escape ampersands

$usertext = htmlspecialchars($_post['usertext']);

something along those lines perhaps with htmlentities() instead

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mihirc
mihirc's picture
Offline
Leader
Pune, Maharashtra, India
Last seen: 5 years 18 weeks ago
Pune, Maharashtra, India
Timezone: GMT+5.5
Joined: 2007-05-09
Posts: 728
Points: 204

hey! Nice idea... will try

hey! Nice idea...

will try to put it in.... it will do wonders, if it can be worked out.

mihir Smile

Proprietor - Thoughtfulviewfinder Services
Web Development | Design | Merchandise | Photography
My personal blog: MihirChhatre.com