default userpic

Code behavior differs with static and dynamic publishing

Vote 0 Votes

Hi everyone,

I'm trying to sort out some inconsistencies between static and dynamic publishing and the changes in code behavior I'm seeing. I'm using 4.3. There are two issues.

Example One: List all Authors in the System
===========================================
The first is that when trying to get a list of all authors in a system with multiple blogs, I get different lists when using static and dynamic publishing:

<mt:authors need_entry="0" include_blogs="all" sort_by="name">
<mt:authorname/>
</mt:authors>

Under dynamic publishing, this works as expected. I get all the users in the system. Under static publishing, I get a different response -- as best as I can tell, I'm only seeing authors that have an entry in the current blog, so it's as if both the need_entry and the include_blogs attributes are being ignored.

Example Two: Hash Variables
===========================
This one is also perplexing. Here's a code snippet:

<mt:var name="key" value="foo"/>
<mt:var name="hash{$key}" value="bar"/>
<mt:var name="hash{$key}"/>

This should output 'bar' and under static publishing it does. But when my template is published dynamically, it outputs nothing.

The combination of these two is particularly rough, because I'm trying to use both in the same template. If I could get both to work in either static or dynamic, I'm willing to be flexible about which I use. But more generally, I'm hoping to understand *why* the behavior is different for these two examples, so that I can code accordingly.

thanks!

-tony

Reported on Movable Type 4.3

5 Replies

| Add a Reply
  • But more generally, I'm hoping to understand *why* the behavior is different for these two examples, so that I can code accordingly.

    Because dynamic and static publishing use different programming languages and libraries.

  • Thanks, Mike. Given that the two publishing methods use different languages and libraries, do you have any suggestions for the two cases I've mentioned?

    It seems notable to me that one issue seems broken in static publishing and one in dynamic. I'm sure there's a longer history of the evolution of these publishing styles that I'm not aware of, and so perhaps this seems naive, but I would expect the behavior of the MT tags and template language to be the same in both models; so if there are examples (like the ones I've mentioned):

    (a) should I expect to find some documentation of known issues between the two (I've scoured the Known Issues for all the 4.x releases and haven't found anything related to my examples)

    (b) is there some alternate syntax I could/should be using in either of these cases as a workaround?

    (c) should I be filing bug reports against these issues?

    thanks for any further clarification!

    -tony

  • Um, Mike's response makes this sound intentional.

    He's correct that's ultimately the underlying technical reason there might be rendering differences. But is ignoring that there really shouldn't be differences. (I have vague recollection of occasional technical reasons for an inconsistency, but in general there should be parity.) You may have found a bug. You can file it via that URL, or inquire through the MTOS-dev mailing list, though note that isn't intended for actual support, but discussion of MT's development.

    I'm not aware of any list specifically cataloging differences between the two publishing methods, unfortunately, and never use the dynamic system myself, so can't take you much further than this.

    • default userpic

      Thanks, Su.

      After digging around in the bug database, I do see that the issue with mt:authors, need_entry="0" and include_blogs="all" is actually a known bug (78204), but not currently assigned:

      http://bugs.movabletype.org/default.asp?78204

      I don't see anything about the simple hash behavior, so I'm going to file a bug about that.

      thanks again,

      -tony

    • Um, Mike's response makes this sound intentional.

      That was a little harsh... I would have merely categorized my response as being somewhat irresponsibly terse.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012