Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

global shows different values

Quote Reply
global shows different values
Hi Andy,
I'm using a simple global to show the number of changed links
Code:
sub { $DB->table('Links')->count( { isChanged => 'Yes', isValidated => 'Yes' } ) }

The problem is, that the global shows 34 in the include_rightsidebar template,
but 16 (which is the right value) when the global is inserted into another template...

Do you have an idea why?

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] global shows different values In reply to
Is the "other" template (the correct value) a dynamic page?

If you're using static pages the sidebar data will only update when you do a build.

Last edited by:

MJB: Apr 21, 2010, 12:44 PM
Quote Reply
Re: [Matthias70] global shows different values In reply to
Matthias70 wrote:
Hi Andy,
I'm using a simple global to show the number of changed links
Code:
sub { $DB->table('Links')->count( { isChanged => 'Yes', isValidated => 'Yes' } ) }

The problem is, that the global shows 34 in the include_rightsidebar template,
but 16 (which is the right value) when the global is inserted into another template...

Do you have an idea why?
Is this happening on all pages, or just some?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] global shows different values In reply to
Andy wrote:
Is this happening on all pages, or just some?

A build does not change the problem.
The right value is shown on category.html, detail.html, home.html and a few other pages...
I only found the wrong value in my right sidebar.
Very strange...

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] global shows different values In reply to
MM, very bizare.

Can you test with this:

do_test
Code:
sub {
my $sth =$DB->table('Links')->select( { isChanged => 'Yes', isValidated => 'Yes' } );
return $sth->query;
}

..and try caliling it in different places, to see what SQL is run.

Hopefully that will give some pointers.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] global shows different values In reply to
Hm, when I call it with
<%do_test%>
it prints out
Code:
SELECT * FROM glinks_Links WHERE isValidated = ? AND isChanged = ?
on all pages...

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] global shows different values In reply to
Mmm, so it should be working just fine then :/

Maybe need to get GT to have a look into it (shouldn't be a bug - but you never know)

Are you using GLinks 3.3? I havn't played around with that version very much (only 3.2) ... due to time - so could be a little bug has been introduced.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] global shows different values In reply to
Andy wrote:
Mmm, so it should be working just fine then :/

Maybe need to get GT to have a look into it (shouldn't be a bug - but you never know)

Are you using GLinks 3.3? I havn't played around with that version very much (only 3.2) ... due to time - so could be a little bug has been introduced.

Cheers

No, I'm using 3.2, too

Matthias
gpaed.de
Quote Reply
Re: [Andy] global shows different values In reply to
Andy wrote:
Mmm, so it should be working just fine then :/

Maybe need to get GT to have a look into it (shouldn't be a bug - but you never know)

Are you using GLinks 3.3? I havn't played around with that version very much (only 3.2) ... due to time - so could be a little bug has been introduced.

Cheers

Perhaps, I'm getting closer to the problem.
I have some categories with an update flag, but there is no updated link inside this category.
Do you have an idea why is that?
Example: http://www.gpaed.de/Unterrichtsmaterial/Spielesammlungen/index.html

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] global shows different values In reply to
Mmm, not sure how the "update" system fully works without having a look. My guess, is that cos some links were made "popular", they have made the category show "updates"

Again, GT may be able to shed a bit more light on this Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!