Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 03:19 pm EDT

Geeklog Forums

"No News to Display"


Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Having an odd issue with my site. The web site was recently moved from one server to another in a new data center. Now, on the main page and all topics but one, I get the message:

"No News to Display
There are no news stories to display. There may be no news for this topic or your user may preferences may be too restrictive".

This happens as a guest and logged in with root access. I can go and edit any stories under the Stories menu, but out of the 6 topics I have, only one topic is working as far as displaying the stories properly.

I dont' see any DB errors and nothing has changed in my config.php.

Any pointers as to where I should spend my troubleshooting? Thanks in advance.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Check your topic permissions.

bye, Dirk
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
I was hoping it would be that easy, but it wasn't Frown

Here is the interesting thing. if you check out http://www.indianapolisfilm.net/staticpages/index.php?page=news you can see a static page I made with all the news items. The topics are all solid on the permissions, at least when viewing through the geeklog admin interface, I'm going to go root around the MySQL end of things now.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Ok, there seems to be something wacky about my backend.

The first SQL statment is generated on the one story Topic that works. The second SQL statment on all other topics that don't work.

Text Formatted Code
SELECT STRAIGHT_JOIN s.*, UNIX_TIMESTAMP(s.date) as day, u.username, u.fullname, u.photo, t.topic, t.imageurl FROM gl_stories as s, gl_users as u, gl_topics as t WHERE (s.uid = u.uid) AND (s.tid = t.tid) AND (date <= NOW()) AND (draft_flag = 0) AND s.tid = 'filmfests' AND s.tid != '' AND (s.perm_anon >= 2) AND (s.tid IN ('General','casting','reviews','fgroup','techtips','filmfests')) ORDER BY featured DESC, date DESC LIMIT 0, 5


Text Formatted Code
SELECT STRAIGHT_JOIN s.*, UNIX_TIMESTAMP(s.date) as day, u.username, u.fullname, u.photo, t.topic, t.imageurl FROM gl_stories as s, gl_users as u, gl_topics as t WHERE (s.uid = u.uid) AND (s.tid = t.tid) AND (date <= NOW()) AND (draft_flag = 0) AND s.tid = 'General' AND s.tid != '' AND (s.perm_anon >= 2) AND 0 ORDER BY featured DESC, date DESC LIMIT 0, 5



And it seems to be something getting lost in translation around this line of code around 161 (give or take a few lines because of my own edits for troubleshooting):

Text Formatted Code
if (!empty($U['aids'])) {
    if ($topic != $_CONF['archivetopic']) {
    $sql .= " AND s.tid != '{$_CONF['archivetopic']}' ";
}
}


I am thinking that because if you look at the one that doesn't work , it is (s.perm_anon >= 2) AND 0 but the correct one doesn't look the right syntax either to me because the NOT is missing. Am I on the right track here? Smile

And interestingly enough, I can only edit stories in that are the only stories displayed for that one topic. When I try to edit any other story, it tell me:

Access Denied: You are trying to access a story that you don't have rights to. This attempt has been logged. Please go back to the story administration screen.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Well, I've now tried restoring various backups to no avail. I'm quite stumped to as to what is causing this geeklog install to fail from loading news on the main page and all of the topics but one. I'll keep hammering away though.

Ok, I've actually narrowed it down to COM_getTopicsSQL in lib-commin.pop

Here is what I do NOT understand.

Using a test user account, that was a story admin, I still have the same issue of only being able to see one topic (and nothing on the main page).

And I've narrowed it down to because when clicking on the one topic that works, this generated SQL inside of COM_getTopicsSQL actually returns an array

Text Formatted Code
SELECT tid FROM gl_topics WHERE (((owner_id = '69') AND (perm_owner >= 2)) OR ((group_id IN (2,17,13,3,18,16,15)) AND (perm_group >= 2)) OR (perm_members >= 2))


Which means the main index.php knows there are stories to display and then it will uses another peice of SQL to grab the stories.

However when I pick a different topic, I get the same generated SQL above, but it returns O because of this part of code inside of COM_getTopicsSQL:

Text Formatted Code
 if( sizeof( $tids ) > 0 )
    {
        $topicsql .= "({$table}tid IN ('" . implode( "','", $tids ) . "'))";
    }
    else
    {
        $topicsql .= '0';
    }



And if you look my issue above, you will see where the AND O comes into play, that is telling Geeklog there are no stories or that this user does not have rights to see anything int his topic.

So at this point I'm pretty much stumped. Is it that I have a corrupt table? I've tried repairing several to no avail. I'm about ready to code this so it doesn't even check Smile But if anyone has some insight, that would be much appreciated. I'm lost to where it is failing, but I'm pretty sure it is because of the COM_getTopicsSQL now.


T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Reporting back.

I had to get creative for a "temporary" fix to this issue as I was getting no where. I created new topics, and moved all my stories into the corresponding topics, now I can get to all the stories by going through the topics and I can edit to. BUT, make that BUT...

I still can NOT display any news on my main page. I keep getting the dreaded "No News to Display" and my COM_getTopicsSQL is retruning "0" on the main page. Does anyone have any guesses to why this would be? I'm pysched that I have the topics working, but I have exhausted all my geeklog knowledge tring to figure out why I can't display anything on the main page, even logged in as me with Root perms. Frown


T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

ironmax

Anonymous
Just curious, What was the last thing that was done as far as any database edits or file edits before you lost access to the front page of your site. Do other people have access to your site? Anyways, I'm gonna take an extreamly large stretch here, have you considered installing a new site and start moving stuff over little by little. I know I ended up doing that myself cuz of a blunder. At this point, you wont be missing much if you went that route. When making the new site, be sure to use the same version before copying over the database info. If your site is vary active, do the forums part last and run a few test runs before changing over the paths and FQDN info. My 2 cents worth and beating a dead horse this long, don't help matters.

 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Thanks for the reply ironmax. And your stretch was not at all large. I've been contemplating that very process. In fact, I've been setting up a seperate geeklog site and trying to figure out what I would need to bring over to restore all the fucntionality my currently has (plugins, custom hacks, etc).

I have a very active geeklog installation, and at this point very frustrated with my web hosting providor. As that is when it broke, is when they migrated the site to their new servers in a new data center, and they are so far ignoring my requests for help.

I use SMF for the forums, and I'm ok there.

I like troubleshooting, as it helps me get a better understanding of how things work. But now, after re-creating new topics and moving my articles in them, and the topic/sections working perfectly, I just am stumped as to why the main page won't display the darn news, even when I take the SQL statment COM_getTopicsSQL generates and run it in phpMyAdmin it works and returns the correct topics.

I'm going to try a little bit longer before breaking down and starting the whole site from scratch and trying to import the users, stories, etc tables. Though in all this, I do think I found a bug in the geeklog design for not displaying topics, but I'll talk about that later (if I can actually offer code to get around it).

Thanks ironmax.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Just a shot in the dark: Could it be the MySQL version on the new server?

I remember that we had a few cases were users reported SQL errors that didn't seem to occur anywhere else. In the end it turned out they were all using Mac OS X Server and the MySQL version that Apple shipped with Mac OS X Server was broken.

Try asking your hosting service if there's anything different about the MySQL version on the new server as opposed to the old one.

bye, Dirk
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Dirk and everyone else who has followed this... I found out what it was! I'm posting here the results/solution as a means of documenting my issue in case it helps anyone else.

First I must say if it wasn't for all the care that Geeklog developers put into organizing the code and documenting what does what, I would have never been able to trouble shoot.

As you recall, the geeklog site I run was migrated to a new server in a new data center. Everything seemed to be fine but geeklog. Mainly, the topics not working. So, I move all the articles into a newly created topics. I can now see all the stories. But, nothing displays on the main page. I copy the database into a new database and make another instance of geeklog and point at the new database it works as designed.

I then reconfigure my main geeklog site to use the new database. Still the problem, persists, "no news to display" on the main page. I then proceed to (back up first) replace all the geeklog files (config.php, lib-common.php, lib-custom.php, etc.) to see at what point it will fix. The answer........

lib-custom.php

I have a custom phpBlock in there that I use phpAdsNew in for my sponsors. It turns out, that database that phpAdsNew uses was NOT transfered correctly/properly. When I looked at the database, there were only 3 tables and no data. So, that was the culprit. Since my ads were setup in blocks to display on the main page, and the (old) topics (for except one apparently) that is why I coudlnt' see any stories. When I created the new topics and moved the stories into them, the sponsor blocks containing the code phpAdsNew code were no longer linked to them, that is why I could now see all the stories in the new topics, but still couldn't on the main page.

So, for now , until I can get a backup of the phpAdsNew DB from the old server that I can restore on the new server, I have turned off (disable) the sponsor blocks I have and the site is loading correctly.

It was nerver racking at times to troubleshoot all this, but I'm glad to live through it. Smile Learning even more about GeekLog and hopefully will post another "hack". Thanks to Dirk and IronMax for responding.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

ironmax

Anonymous
If you have not found an answer to this problem, verify this section in your config.php file to see if its the language portion that messing things up. I just ran into this problem and ended up reverting back to the standard portion listed below until I can get a handle on how this works.

Michael

Text Formatted Code


// +---------------------------------------------------------------------------+
// | LOCALE SETTINGS                                                           |
// |                                                                           |
// | see docs/config.html#locale for details                                   |
// +---------------------------------------------------------------------------+

$_CONF['language']        = 'english';
$_CONF['default_charset'] = 'iso-8859-1';

// Note: You may want to consider using 'utf-8' as the default character set
// for new sites, especially when using the multi-language support (see below).
// Make sure to use a matching language file, e.g. 'english_utf-8' then.

$_CONF['locale']          = 'en_GB';
$_CONF['date']            = '%A, %B %d %Y @ %I:%M %p %Z';
$_CONF['daytime']         = '%m/%d %I:%M%p';
$_CONF['shortdate']       = '%x';
$_CONF['dateonly']        = '%d-%b';
$_CONF['timeonly']        = '%I:%M%p';
$_CONF['week_start']      = 'Sun'; // can be 'Sun' or 'Mon'
$_CONF['hour_mode']       = 12;    // 12 hour am/pm or 24 hour format

// Number formatting
$_CONF['thousand_separator'] = ",";  // could be ' , . etc.
$_CONF['decimal_separator']  = ".";  // could be , . etc.
$_CONF['decimal_count']      = "2";  // if a number has decimals,
                                     //  force to this depth

// Multi-language support
// (note that this section is commented out - remove the '/*' and '*/' lines
//  below to activate it and make sure you understand what it does)
/*

// IMPORTANT!
// 1) Both the $_CONF['language_files'] and the $_CONF['languages'] arrays
//    (see below) must have the same number of elements.
// 2) The shortcuts used must be the same in both arrays.
// 3) All shortcuts must have the same length, e.g. 2 characters.

// The shortcuts are to be used in IDs of objects that are multi-language
// aware, e.g. /article.php/introduction_en and /article.php/introduction_de
// for the English and German version of an introductory article.

// Supported languages
// Maps a shortcut to a Geeklog language file (without the '.php' extension)
$_CONF['language_files'] = array (
    'en' => 'english_utf-8',
    'de' => 'german_formal_utf-8'
);

// Display names of supported languages
// Maps the same shortcuts as above to a language name. The language names
// are used to let users switch languages, e.g. in a drop-down menu.
$_CONF['languages'] = array (
    'en' => 'English',
    'de' => 'Deutsch'
);

*/

 
 Quote

dba2020com

Anonymous
awake
Don't know if this is in line with the correction but I have version 1.4.1. In the config.php there is a line (I have no line numbers) that reads: $_CONF['hide_no_news_msg'] = 1; // If 1, hide No News To Display msg It was originally set to "0" after setting it to "1" the banner went away. BOL dba2020.com :banghead: - me on a good day!
 Quote

All times are EDT. The time is now 03:19 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content