CGBlog archive links error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

CGBlog archive links error

Post 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!
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post by rubberglover »

Bump? :)
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post 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...
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: CGBlog archive links error

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post 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.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: CGBlog archive links error

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
nurzki
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 11, 2008 1:54 am

Re: CGBlog archive links error

Post by nurzki »

I am having the same error also Dec 1999. Happens when you assigned 2 or more categories.
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post 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....
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post 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???
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

Re: CGBlog archive links error

Post by inyerface »

Did you delete the post and recreate it?
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: CGBlog archive links error

Post 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
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGBlog archive links error

Post 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
Last edited by Gregor on Thu Sep 23, 2010 4:30 pm, edited 1 time in total.
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

Re: CGBlog archive links error

Post by inyerface »

I posted the fix in the Forge
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGBlog archive links error

Post by Gregor »

Thanks for your time and effort.
Gregor
Post Reply

Return to “Modules/Add-Ons”