skshost Posted April 26, 2007 Share Posted April 26, 2007 Any successfully validated their WHMcs install? Of course there's many pages withing WHMcs that do validate, but I'm having issues with links containing a session ID. Also get errors with links to knowledge base articles. I did end up modifying my .htaccess to redirect to "myhost.com/order.php?step=2&pid=1" with alternate links("myhost.com/basicplan.order" kinda neat) to get my pages outside of WHMcs to validate, but this won't work with issues within WHMcs. Any ideas? For those who aren't familiar: http://validator.w3.org/ 0 Quote Link to comment Share on other sites More sharing options...
trine Posted April 26, 2007 Share Posted April 26, 2007 It can't be fully W3 validated because some of code printed to the template is generated by the system. In order to make it compliant, you will have to pass any template vars that the system generates to a modifier or callback function that will perform markup correction. Is there any reason that you need it 100% W3 compliant? and what is the doctype you are trying to achieve? 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 Transitional. My main priority is to validate the homepage to include it in my SEO sitemap. Could you elaborate on "a modifier or callback function"? 0 Quote Link to comment Share on other sites More sharing options...
trine Posted April 26, 2007 Share Posted April 26, 2007 Well, it's something that you'd have to script, so if you're not a programmer, then it's a steep learning curve. The good news is, for what you want to do, make it 4.0 ? transitional, the home page should be easy enough to make compliant. That will just necessitate changes of your template files, since there is little of no script output there. When you browse to (make sure the host and path is correct) http://validator.w3.org/check?uri=http%3A%2F%2Fwww.skshost.com%2Fwhmcs%2F The W3 validator will tell you exactly what you need to fix. You will need to fix the header, footer and body of the home page. If you customized it, you may have to fix a few other pages too. I believe the reason why there is no validated markup is two-fold: 1. Matt can't control if you need XML, HTML be it STRICT LOOSE or TRANSITIONAL 2. Basic markup will work and is backwards compatible (for the most part unless a user's browser is set to strict or a specific markup version) 3. WHMCS has been in development a while and it's just not practical to go back and recode everything as of yet (even though it'd be nice) ----- Now back to the stuff I mentioned... With a smarty modifier, you could automatically correct all markup using Tidy. It is a bit of work, but can be done with a little ingenuity. But for practical purposes, unless you are looking to do something very specific (like ISO certification) then it's not what you need ... anyway ... A smarty modifier is used like: {$variable|modifier_name} This will pass the contents of $variable to a smarty script that you would need to write, in order to correct the markup. For more on smarty see http://smarty.php.net. You can do all sorts of neat stuff with smarty modifiers and functions . With a php callback function, the same could be achieved. It can essentially save the output to a variable, allowing you to perform whatever actions you need. Anyway, there would be a way to do this, using "tidy", and building the modifier to correct all markup, before the page gets saved to the cache. Best is to use a Smarty modifier, not a callback. 0 Quote Link to comment Share on other sites More sharing options...
trine Posted April 26, 2007 Share Posted April 26, 2007 tidy can be found at: tidy.sourceforge.net/ 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 Thanks for the info. I have used modifiers quite a bit recently. I'm not quite sure if the main problem I'm facing deals with anything more than links like this: "http://myhost.com/whmcs/knowledgebase.php?action=displayarticle&catid=1&id=1". This is on the homepage which I've modified to include "most popular knowledge base articles". Tidy could solve this? 0 Quote Link to comment Share on other sites More sharing options...
Dominic Posted April 26, 2007 Share Posted April 26, 2007 Change & to & and you should be sorted 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 That'd be easy if I was the one deciding what the most popular knowledge base articles are. It's generated from the database(by views), so that's why I wasn't confident that I could validate. EDIT: I could just use a smarty modifier.. I'll try that.. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 No sleep for a bit now, so it took looking at the template source to realize 1 problem. Only 1 problem and I'll have no difficulty validating any page of my WHMCS install: cannot generate system identifier for general entity "PHPSESSID". ...layarticle&catid=1&id=4&&PHPSESSID=6c6a0... reference to entity "PHPSESSID" for which no system identifier could be generated. ...e&catid=1&id=4&&PHPSESSID=6c6a0... I have no clue. Sleep may avail a solution, or coffee.. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 I disabled session.use_trans_sid and validation passed. I'm willing to tell my visitors to enable cookies(who doesn't?) but are there any other known issues this may cause? 0 Quote Link to comment Share on other sites More sharing options...
trine Posted April 26, 2007 Share Posted April 26, 2007 normally it should be okay. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 26, 2007 Author Share Posted April 26, 2007 Great! Seems that this was an easy fix, perhaps a waist of topic. So I hope someone else gets something else out of it. Thanks again 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.