scottlindberg New Member
 member is offline
Joined: Aug 2006 Gender: Male  Posts: 34 Karma: 1 |  | Connected File / {{logentrylist}} Problem « Thread Started on Aug 9, 2009, 11:46am » | |
I just updated to v1.8.2 and a significant problem have arisen with my connected files as far as the {{logentrylist}} variable is concerned.
Each author on my site has been given a page of their own that lists only posts made by them. I'm using the variable syntax {{logentrylist author}} to denote where the list of their entries should be placed (where "author" is replaced by the author's username). The problem is the {{logentrylist}} variable isn't generating a list.
- the connected files are properly chmod'ed. - both Entry List Link Template templates are filled out correctly. - other variables used on the connected pages work just fine. - the exact same method worked fine when I had v1.3.1 installed.
As an example, I have an author named "Acton Bjorn" who has their own page (http://www.sllab.net/arslonga/designers/actonbjorn.html). In the right column on that page, under the heading "by this designer" I've inserted the variable {{logentrylist Acton Bjorn}} ... but yet the author's posts are not generating when the connected files are rebuilt. The files are rebuilding correctly, but the logentrylist is blank.
I'm wondering if this is a bug in regards to a space being used in the author's name? I've tried inserting the html entity for space and non-breaking space into the name in the variable (see code examples below), but then then the gm variable itself shows up as text on the page.
Code:| {{logentrylist Acton Bjorn}} |
|
Code:| {{logentrylist Acton Bjorn}} |
|
If anyone has any ideas for me to try so I can get this to work, I'd greatly appreciate it. I'd hate to have to revert to the earlier version of Greymatter I was using (v1.3.1), but this is a vital element of my site, and I need to get it working.
Thanks in advance for your help! Scott
| |
|
scottlindberg New Member
 member is offline
Joined: Aug 2006 Gender: Male  Posts: 34 Karma: 1 |  | Re: Connected File / {{logentrylist}} Problem « Reply #1 on Aug 9, 2009, 11:01pm » | |
I've determined that the error isn't due to the author's name having a space, but am still grasping at straws as to why {{logentrylist AuthorName}} isn't generating my list of entries. Am I correct that the logentrylist variable takes it's data from the Entry List Link Template: Standard and Entry List Link Template: Extended in the Miscellaneous Templates section? Is anything else required to make logentrylist work? My entry list link templates are below (the standard and extended lists are the same) ...
Code:<div class="item"> <div class="findsimage"> <a href="{{pagelink}}" title="{{entrysubject}}. {{author}} {{entrymusic}}"><img src="/images/{{yearyear}}/{{entrysubject}}tn.jpg" alt="{{entrysubject}}. {{author}} {{entrymusic}}" width="100" height="100"></a> </div> <div class="findstext"> <p> <strong><a href="{{pagelink}}" title="{{entrysubject}}. {{author}} {{entrymusic}}">{{entrysubject}}</a>. {{author}}</strong><br> {{entrymusic}}<br> <span class="datefound">Found on {{monthword}} {{dayday}}, {{yearyear}}</span> </p> </div> <div style="clear: both;"></div> </div>
|
|
Thanks. Any help at all would be greatly appreciated.
| |
|
scottlindberg New Member
 member is offline
Joined: Aug 2006 Gender: Male  Posts: 34 Karma: 1 |  | Re: Connected File / {{logentrylist}} Problem « Reply #2 on Aug 10, 2009, 12:23am » | |
So I've done some additional testing and narrowed the potential cause of my problems down a little bit further ...
First I replaced {{logentrylist AuthorName}} in my connected file with just {{logentrylist}} and it resulted as expected, listing all the entries posted to the site.
Next I used {{logentrylist number}} and it too worked fine, listing 7 most recent entries (since that's the number I've specified in the configuration).
Finally I used {{logentrylist month}} and it posted all articles written in August ... including August of this year, August of last year, August of the year before, and so on. I believe this to be a bug, per the description in the manual that it should list "the entries only for the most recent month."
I've also tried all three of the above tests using a page that's generated completely within Greymatter -- the Archive Master Index template, since I do not use this page on the site. These test produced the exact same results as above. This shows that this isn't a connected page problem, and it's likely an issue with {{logentrylist AuthorName}}. Could any of you GM experts verify that using the author's name to delimit the {{logentrylist}} variable isn't performing as intended in GM v1.8.2? Could this be a bug in the software? If so, is anyone able to fix it??
Again, any help at all would be greatly appreciated.
| |
|
scottlindberg New Member
 member is offline
Joined: Aug 2006 Gender: Male  Posts: 34 Karma: 1 |  | Re: Connected File / {{logentrylist}} Problem « Reply #3 on Aug 11, 2009, 1:55pm » | |
Here's an interesting observation on this problem ...
{{logshortentrylist Author}} isn't working either ... but {{logmoreentrylist Author}} is. Could this help sort things out?
| |
|
Carlos Phelps Global Moderator
     member is offline
Joined: Jan 2007 Gender: Male  Posts: 177 Karma: 30 |  | Re: Connected File / {{logentrylist}} Problem « Reply #4 on Aug 12, 2009, 11:34pm » | |
Scott,
I have started looking at this, it may take me a few day to find the problem. Yes, your last observation will help.
Thanks you for all your digging.
| |
|
scottlindberg New Member
 member is offline
Joined: Aug 2006 Gender: Male  Posts: 34 Karma: 1 |  | Re: Connected File / {{logentrylist}} Problem « Reply #5 on Aug 19, 2009, 2:04pm » | |
Hey Carlos. Just wondering if you've made any progress with this yet? If there's anything I can be doing to help, please let me know. Thanks again! Scott
| |
|
Carlos Phelps Global Moderator
     member is offline
Joined: Jan 2007 Gender: Male  Posts: 177 Karma: 30 |  | Re: Connected File / {{logentrylist}} Problem « Reply #6 on Sept 4, 2009, 7:57pm » | |
Sorry for the slow reply, but I have been busy at work lately. I think I have found the location of the problem you are having, but I do not have a correction, yet. Will be looking at it this weekend.
| |
|
petefinnigan Global Moderator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: Aug 2006 Gender: Male  Posts: 219 Location: York, England Karma: 18 |  | Re: Connected File / {{logentrylist}} Problem « Reply #7 on Sept 9, 2009, 1:52pm » | |
Hi Scott, Carlos,
I have had a quick look at this issue this evening and found the bug. The problem is in the Gm_Core::generateEntryLogListAuthor function. Inside the loop that processes the entries to return the list for the current author for substitution there was a scoping issue with a variable $listsubsub - the variable was defined inside an IF and ELSE block so that the short and more versions would work but not the main variable {{logentrylist}} as it used the same variable outside the IF/ELSE. The variable outside the IF/ELSE is not the same as inside so it has no contents.
I have fixed the issue by defining the variable at the top of the function and removed the "my" from it in three places below so that the IF/ELSE and also outside the function now all use the same variable and hence the same data.
As there are a number of edits I have modified a Gm_Core.pm file from the cgi-bin\libs directory and I have uploaded a modified version to my site at http://web.petefinnigan.com/greymatter_mods.htm - have a look at the section titled "1.8.2 - Loglistentry author issue" - from there you can download the new Gm_core.pm (rename it from Gm_core.pm.txt and copy it to the libs directory. I also created a quick demo to test all three variables with number, month, author and none in a linked page. This is linked from the same page and also the template is shown.
Hope this helps, any questions let me know
cheers
Pete
|
|
|
Carlos Phelps Global Moderator
     member is offline
Joined: Jan 2007 Gender: Male  Posts: 177 Karma: 30 |  | Re: Connected File / {{logentrylist}} Problem « Reply #8 on Sept 9, 2009, 8:34pm » | |
Good job, Pete.
| |
|