Page 1 of 1
CGBlog archive links error
Posted: Tue Jun 29, 2010 11:42 am
by rubberglover
Hey all,
I'm having trouble with the CGBlog module... I know there is an issue with the archive and pretty URLs, so for the time being I have disabled pretty URLs on my site. However, when I post articles they are all added to a single archive date of December 1999! I'm using pretty standard templates and smarty embeds, so a I'm a bit confused as to why this is happening. Anyone encountered this before?
Template:
Code: Select all
{* archive template *}
{if isset($archivelist)}
<ul class="post-category">
{foreach from=$archivelist item=one}
<li class="post-category-month">
<a href="{$one.summary_url}">{$one.datestamp|date_format:"%B"} {$one.datestamp|date_format:"%Y"}</a> ({$one.count})
</li>
{/foreach}
</ul>
{/if}
Smarty call:
Code: Select all
{cms_module module="CGBlog" action="archive"}
I'm still getting used to templating this module so apologies if the answer is staring me in the face! I am using CMSMS v1.7.1 and CGBlog v1.4. Please help!
Re: CGBlog archive links error
Posted: Tue Jun 29, 2010 2:13 pm
by rubberglover
Bump?

Re: CGBlog archive links error
Posted: Wed Jun 30, 2010 3:32 pm
by rubberglover
Anyone have any ideas? I've had to disable the archive for the time being, but would love to get it back online...
Re: CGBlog archive links error
Posted: Wed Jun 30, 2010 3:58 pm
by tyman00
What are you getting for returned timestamps? Are they all that date? how about the normal blog article is the timestamp correct there?
In the future please don't bump a post within hours, it will not get you anywhere any faster. All it really does is aggravate people which can cause them to ignore you.
Also, the lack of responses is likely because of the lack of information. We really don't have much to go off of.
Re: CGBlog archive links error
Posted: Wed Jun 30, 2010 5:36 pm
by rubberglover
Sure, totally understand... only bumped initially because I was meeting the client that afternoon and well, you know how desperation can take hold when a deadline is looming
Time stamps are all showing correctly in the summary and detail templates. The blog posts are also correctly ordered by date via the summary templates.
Var dump of the $archivelist variable from within the archive template is as follows:
Code: Select all
array(5) {
["month"]=>
NULL
["year"]=>
NULL
["count"]=>
string(1) "3"
["summary_url"]=>
string(141) "[SITE_URL](edited for security)/index.php?mact=CGBlog,cntnt01,default,0&cntnt01year=&cntnt01month=&cntnt01returnid=98"
["datestamp"]=>
int(944006400)
}
Array
Var dump of an $entry variable from a summary template is as follows:
Code: Select all
object(stdClass)#177 (13) {
["author"]=>
string(109) "Emily Felix-Davies, Football Events Manager for CLIC Sargent , the UK’s leading children’s cancer charity"
["id"]=>
string(1) "5"
["title"]=>
string(34) "Kick for Children with Cancer 2010"
["content"]=>
string(2566) "
This summer 125,000 children and young people from schools, etc.
"
["summary"]=>
string(502) "
As Football Manager for the UK's leading children's cancer charity etc.
"
["postdate"]=>
string(19) "2010-06-23 11:04:31"
["startdate"]=>
NULL
["enddate"]=>
NULL
["categories"]=>
array(2) {
[0]=>
array(2) {
["category_id"]=>
string(1) "4"
["name"]=>
string(6) "Events"
}
[1]=>
array(2) {
["category_id"]=>
string(1) "2"
["name"]=>
string(4) "DEBP"
}
}
["fieldsbyname"]=>
array(1) {
["author"]=>
object(stdClass)#179 (4) {
["value"]=>
string(109) "Emily Felix-Davies, Football Events Manager for CLIC Sargent , the UK’s leading children’s cancer charity"
["id"]=>
string(1) "2"
["name"]=>
string(6) "Author"
["type"]=>
string(7) "textbox"
}
}
["fields"]=>
array(1) {
[0]=>
object(stdClass)#179 (4) {
["value"]=>
string(109) "Emily Felix-Davies, Football Events Manager for CLIC Sargent , the UK’s leading children’s cancer charity"
["id"]=>
string(1) "2"
["name"]=>
string(6) "Author"
["type"]=>
string(7) "textbox"
}
}
["file_location"]=>
string(62) "URL(edited for security)/uploads/cgblog/id5"
["detail_url"]=>
string(128) "URL(edited for security)/index.php?mact=CGBlog,cntnt01,detail,0&cntnt01articleid=5&cntnt01returnid=97"
}
Any advice you can offer would be hugely appreciated. If you can think of any other information that might make the situation easier to understand I'd really appreciate it if you could let me know so I can post it... sorry about the vague nature of the first post; just wanted to get the ball rolling in case anyone else had encountered this.
Many thanks for the response.
Re: CGBlog archive links error
Posted: Wed Jun 30, 2010 6:09 pm
by tyman00
That is weird. The timestamp that is in your first var dump does equate to Dec/1999.
I'll have to install CGBlog to see if I can replicate the issue.
Re: CGBlog archive links error
Posted: Fri Jul 02, 2010 12:48 am
by nurzki
I am having the same error also Dec 1999. Happens when you assigned 2 or more categories.
Re: CGBlog archive links error
Posted: Fri Jul 02, 2010 4:42 pm
by rubberglover
Bummer that you are getting the same problem nurzki, though I'm kind of relieved that mine is not an isolated incident

Are you able to correct the problem by amending the category setup? I tried removing all but the default category and assigning all of the articles to that, but the problem remained....
Re: CGBlog archive links error
Posted: Mon Jul 12, 2010 2:08 pm
by rubberglover
Hi there,
Thanks for the response, and sorry for the late reply (been away on me hols) but this change didn't correct the problem. That line is encountered within an if statement:
Code: Select all
if( isset($params['summarypage']) )
{
$tmp = $this->resolve_alias_or_id($params['summarypage']);
if( $tmp ) $summarypage = $tmp;
unset($params['summarypage']);
}
Do I need to amend all instance of the array name to 'paramsp' within this statement? Is $paramsp even a declared array???
Re: CGBlog archive links error
Posted: Mon Jul 12, 2010 5:58 pm
by inyerface
Did you delete the post and recreate it?
Re: CGBlog archive links error
Posted: Tue Jul 13, 2010 12:09 pm
by rubberglover
Aaah, no I didn't. Sorry! Didn't check to see at what point this script was run... Will try making the mods again and reposting
Re: CGBlog archive links error
Posted: Thu Sep 23, 2010 3:57 pm
by Gregor
Hi,
Just gave the archive option a try (CGBlog v1.6), and it shows:
december 1999 - (40)
http://www.uisge-beatha.eu/logboek/archive/%20%20%200/00.html
Checked all articles, however there are none dated 'december 1999' (the site was not even designed by then

)
Quick work around:
Code: Select all
update cms_module_cgblog
SET `start_time` = `cgblog_date`
WHERE `start_time` IS NULL
Before installing the files from a previous post, anyone having (still) the same error?
Gregor
Re: CGBlog archive links error
Posted: Tue Nov 16, 2010 1:44 am
by inyerface
I posted the fix in the Forge
Re: CGBlog archive links error
Posted: Tue Nov 16, 2010 6:15 am
by Gregor
Thanks for your time and effort.
Gregor