Page 1 of 1

Base tag hard coded. I thought this bug was fixed

Posted: Thu Jan 17, 2008 6:10 am
by nivekiam
This says it's closed: http://dev.cmsmadesimple.org/tracker/?g ... il&aid=580

plugins/function.metadata.php says you can set showbase to false in config.php

I've tried setting showbase to false in config.php.  Maybe I'm typing something wrong.  The only way I'm able to get the problem causing base tag to go bye-bye is editing /plugins/function.metadata.php

Here's what I've tried in config.php

$showbase = false; (I didn't believe it would work but I tried it)
$config['showbase'] = false;  (I thought that would work, but it didn't)

Well I figured out what needs to be changed in function.metadata.php.  I've filed a bug report:
http://dev.cmsmadesimple.org/tracker/?f ... 6&atid=101

I just want to re-iterate that this should be turned off by default.  Actually I wish it would be removed completely, it would be about 6 lines of code that wouldn't be wastefully evaluated for every single page load.  If someone has some really oddball reason for setting the base tag they can do so in their template, less code, less overhead.

Re: Base tag hard coded. I thought this bug was fixed

Posted: Thu Jan 17, 2008 6:39 am
by calguy1000
Uhm.... did you try going to 'Extensions >> Tags' and looking at the 'help' for the 'metadata' tag (or any of the others).

if viewing the help for the metadata tag you should have seen:
What does this do?

Displays the metadata for this page. Both global metdata from the global settings page and metadata for each page will be shown.
How do I use it?

Just insert the tag into your template like: {metadata}
What parameters does it take?

    * (optional)showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true if use_hierarchy is set to true in config.php.
Which tells me, that you're not really exploring and/or reading the pages that your displaying.... instead you jumped ahead, and started jumping to conclusions.... yes, maybe this could be improved.... but then so could alot of things about alot of packages.

lets just slow down here, re-evaluate, and start phrasing things in a way that won't offent too many people...

And, until you've got two years or more of effort contributing into this package, don't go telling me or anybody else how things 'should be done'.

Thank you.

Re: Base tag hard coded. I thought this bug was fixed

Posted: Thu Jan 17, 2008 7:05 am
by nivekiam
You're right it could be improved ;)  Sorry if I offended anyone.

There are config settings all over the place, config.php, Tags, Global Settings, etc.  I did search and didn't find that this was an optional setting.  Thanks for pointing it out.

But then can function.metadata.php at least be cleaned up so it doesn't refer to config.php is where that setting it set? ;)

That's why I got stuck on why this was still broken.  I didn't exactly jump to it.  I found this out a couple of days ago and spent about 2 hours digging around tonight before posting this thread and a bug report.

Again, having this turned on by default breaks named anchors in the preview mode.  So if it was turned off by default clicking on a link that points to a named anchor in preview would work as expected.