We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6729

Summary: Article date modified function not found in atom webfeed plugin
Product: OJS Reporter: Ales Kladnik <ales.kladnik>
Component: Plug-insAssignee: Michael Felczak <michael.pkp>
Status: RESOLVED FIXED    
Severity: normal CC: alec, ales.kladnik, chuck.t.parker, michael.pkp, morin, pkp-support
Priority: P3    
Version: 2.3.7   
Hardware: All   
OS: All   
Version Reported In: Also Affects:
Attachments: Patch implementing Ales Kladnik's fix
Patch against OJS 2.3.6

Description Ales Kladnik 2011-07-01 02:38:39 PDT
I updated OJS to 2.3.5 using a patch from 2.3.4

The function for determining feed updated date in "atom.tpl" has an issue that breaks the execution of the template and ends the feed rendering after the title.

The problematic function is (lines 17-26 in atom.tpl):

 	{* Figure out feed updated date *}
 	{assign var=latestDate value=$issue->getDatePublished()}
 	{foreach name=sections from=$publishedArticles item=section}
 		{foreach from=$section.articles item=article}
			{if $article->getDateModified() > $latestDate}
 				{assign var=latestDate value=$article->getDateModified()}
 			{/if}
 		{/foreach}
 	{/foreach}
 	<updated>{$latestDate|date_format:"%Y-%m-%dT%T%z"|regex_replace:"/00$/":":00"}</updated>


I managed to get the feed working again by replacing $article->getDateModified() with $article->getDatePublished(). It seems that getDateModified() doesn't exist for article. I don't know though if the function for estimating feed date is now working as it was intended, but at least it works somehow.
Comment 1 Pat Morin 2011-07-04 06:09:54 PDT
Created attachment 3585 [details]
Patch implementing Ales Kladnik's fix
Comment 2 Pat Morin 2011-07-04 06:11:05 PDT
I had the same problem and Ales' fix worked for me.  I've attached it as a patch.
Comment 3 Michael Felczak 2011-07-04 10:44:52 PDT
Thanks, Ales and Pat for your help with this.

The getDateModified function has since been reneamed to getLastModified -- this was one place where it wasn't updated to the new name.
Comment 4 Michael Felczak 2011-07-04 10:47:21 PDT
Created attachment 3588 [details]
Patch against OJS 2.3.6
Comment 6 Michael Felczak 2011-07-04 10:51:16 PDT
Fixed.
Comment 7 James MacGregor 2012-03-12 10:44:23 PDT
*** Bug 7025 has been marked as a duplicate of this bug. ***