Help - Search - Members - Calendar
Full Version: Some coding mistakes
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
villiros
These are unrelated, but creating more then one topic feels wrong.

Anyways, in (2.661):

In mt-search.pm, on line 24, App::Search is created but not given a directory parameter explicitly. In my case it seems to fail to find mt-db-pass.cgi because of that so all searches fail. Adding "Directory => $MT_DIR" fixed the problem for me.

In lib/Entry.pm on line 246, it decides to add anchor based on archive_type_preferred alone, while it should also check @_ (archive_type attribute) to be 'Individual' -- doing that fixed links like "Archive/000001.html#000001#more" for me. (here's when it pops up: preferred archive is daily, but I want "Continue reading" links to point to individual archive, it's nicer).

would be very nice if these get fixed in some future release.
crys
And the latter would also fix the bug I reported several versions back -- that if the default type is Individual the anchors never get added.
girlie
QUOTE (villiros @ Feb 10 2004, 12:47 AM)
In lib/Entry.pm on line 246, it decides to add anchor based on archive_type_preferred alone, while it should also check @_ (archive_type attribute) to be 'Individual' -- doing that fixed links like "Archive/000001.html#000001#more" for me. (here's when it pops up: preferred archive is daily, but I want "Continue reading" links to point to individual archive, it's nicer).

Villiros - if I'm understanding you correctly, MTEntryLink would give you what (I think) you want (Individual permalinks without anchors when the preferred archive type is not Individual?) without hacking any code at all.
CODE
<MTEntryLink archive_type="Individual">
doesn't produce anchors even if the preferred archive type is not Individual. In fact, it doesn't give anchors regardless of the archive type you specify - these were always coded in templates thusly:
CODE
<a href="<$MTEntryLink$>#<$MTEntryID pad="1"$>">
prior to the addition of the MTEntryPermalink tag.

This code:
CODE
<MTEntryPermalink archive_type="Individual">
does produce anchors when the preferred archive type is not Individual (which I don't think it should do based on what the changelog for 2.51 describes).

So it looks like that part is indeed the bug (and of course, what crys mentioned as well, because that would also seem contradictory to the change log).

P.S. I tested various combinations, so I hope I didn't get lost and post the wrong results. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.