I'm probably just not understanding something really simple, but I can't get an article to display?
Have two user-submitted articles (one is just a "test" by me), and trying to display either one, whether it's using the menu manager or by a direct link to the article results in blank space where the article should appear. Also, there's a link at the top showing "Page 1 2", and if you click on the "2" it sends you back to the home page?
Like I said, probably something really stupid I'm doing.
Running 1.1RC1, TP0.75 and TP_Oxygen (though the problem is the same when using Default)...
Here's a link to the article so you can see what I'm talking about:
http://www.mvohio.net/index.php?page=5
If anyone can give me a push in the right direction on this, I'd appreciate it...
Thanks!
Have you tried creating the article with the editor off? You can turn it off in your TPAdmin settings.
Also..have you "approved" the submitted articles?
Yep and yep...
I just tried creating one myself, and same thing: a two page link, but blank first page and link to page 2 send me back to home page... the breadcrumb at the top of the page actually shows the article title, though..?
If you create a third article, does it show?
Also...when editing the articles, they do have content?
Nope... still doesn't show...
And yep - if I go to edit the articles, the content is all there....
Kinda glad I got you all stumped on this one too - makes me feel less like an idiot (even tho I still think it's something stupid I've done)...
:)
It could be something with the counting routine in TP...are you using the latest files there?
As far as I know... I downloaded and installed the TP files only archive (after a bad package manager install)... could I have missed one?
I'll have to double check...
I checked, double-checked, and re-uploaded just to be on the safe side - but no articles...
Anyone have any more ideas? I can go thru the code line by line if I have to, but would rather not... :)
And please - don't put it past being operator error, either! I'm ready to try anything at this point...
I can take a look..but I need to ask for a temporary admin account to look at the TPadmin section. I am not sure..but it might be a bug in TP - or a wrong database record.
No problem - I'll PM you the access... thanks, Bloc! I appreciate it....
I just know this is something stupid..
*sigh*
Think I may have stumbled across somthing...
In TPORTAL.PHP, this code is at line 328:
if($row['useintro'] == -1)
$phplink = '-1';
elseif($row['useintro'] != -1 && $mypage!=''){
$phplink = '0';
else
$phplink = $row['useintro'];
$bt[] = array(
userintro = 1
mypage = 5
It's catching on the ELSEIF" - which keeps the bt array from being populated... and the bt array is what's displayed on the page...
Am I gettin' close?
mm..not quite. I am using the "useintro" for a check...if its "-1" then its a php article, and that can't use a intro. $bt is filled anyway.
Hmm... looked down in the merge (just below), and couldn't get anything to echo out of $t either...
I gotta scoot right now, but will look at it some more this evening...
Quote from: Bloc on December 22, 2005, 08:36:27 PM
mm..not quite. I am using the "useintro" for a check...if its "-1" then its a php article, and that can't use a intro. $bt is filled anyway.
Duh. I see what you mean now - I was lumping everything together. I can see where it's getting populated now.
Sorry 'bout that....
Update: Verified that it's leaving TPortal_init with $context['TPortal']['boardnews'] fully loaded... now to track down where that's going...
Maybe some sleep first, tho...
Quick (and probably easy) PHP question...
With:
$context['TPortal']['boardnews'] - 1
$counter - 1
$context['TPortal']['mystart'] - 0
$context['TPortal']['frontpage_limit'] - 1,
will $show ever be set to true in the following code?
foreach($context['TPortal']['boardnews'] as $news){
// reached the start yet?
$show=false;
if($counter > $context['TPortal']['mystart'] || $counter == $context['TPortal']['mystart']){
if($counter< ($context['TPortal']['mystart']+$context['TPortal']['frontpage_limit']))
$show=true;
}
$counter++;
}
I don't see how it could be, but....
Okay, I've answered my own question (I think). I don't believe that the "$show" variable will ever be set to true under these conditions...
Since $mystart was always at 0, I tried commenting the nested IF condition that set $show to true, and voila! I now have articles appearing...
Not sure why $mystart isn't allowing this to work properly, though... I'll dig in the code to see what exactly it's being used for...
I have been meaning to rewrite this for some time, its not optimal and may even give wrong results.
So I didn't break it??
Yay!!
;)
Funny thing this is exactly one of the issues I am haveing right now on my forum. Thought it was just me! I also have other issues like post icons not showing up just appears as text and not being able to post links of any kind without them becoming distorted and broken.
I'll gladly grant you access to mine Bloc.
Thanks. I am testing and sorting this out now, so when I am done I like to test it out. :)
Bloc, you want the admin access back at my site? No prob if it'll help you out....
:)