Page 1 of 1

Can't display the "next page" of entries (older en

Posted: Tue Jul 12, 2005 3:25 am
by vincem
I could swear it was working before... ;-)

Any way, I am using Serendipity 0.8 in an awkward non-embeded configuration, even though it resides inside my HTML web site, in a DIV. That's the only way I found back then to have everything work fine and retain Serendipity's own CSS without major PHP coding.

But I just realised that clicking on the "next page" link at the bottom of my main blog page (where it reports that this is "page x of y, totalling xyz entries) no longer works.

The url that shows on my status bar before I click is
Obviously, I never get there and end up on the same initial page with a messed up CSS.

I have experimented and found that to work fine, it should be

This is probably due to my home made embeding, yet every other function works (the only drawback being that the new pages called from where my blog resides on the web site open up in a clean Serendipity page, without my headers, but I can live with that.)

So archives, calendar, categories all work fine, for exemple I get
when clicking on the calendar.

I don't understand why the page bottom link doesn't follow the others.

Could someone possibly point me into the right direction? I've looked into as many files as I could but can't seem to figure out where to set this without changing my paths (which, once again, work with the rest)...


Re: Can't display the "next page" of entries (olde

Posted: Tue Jul 12, 2005 12:24 pm
by garvinhicking
When I go to your blog site, I do get the right links that point to ... ?

Did you fix the error already? :)

Anyways, you got a beautiful site there with great photos. I immediately subscribed to your feed. :)


Posted: Tue Jul 12, 2005 5:10 pm
by vincem
Hi Garvin,

And thanks for your prompt reply! I got a kick out of your message, one because I thought I had disabled the option to subssribe to RSS feeds (for simplicity, I need to turn it on again, and thanks for the compliment ;-) but you obviously know your way around the script. And two because you immediately pinpointed the bug I was chocking on.

As you mentioned, opening will show the main blog page with the right link at the bottom (but without my main site header). It's my cheap embedding solution that was responsible for my trouble, since I created a page to display the blog in,
It gave the blog, at least on the most currently visited entry page, the same look as the rest of the site.

So I guess I could give up on that, unless there is a way to easily embed it (with the embed option turned on?) into an HTML site, without a major PHP incursion (which I sure don't mind, but don't have much knowledge of)...

Any thoughts appreciated!

Thanks again!

Posted: Wed Jul 13, 2005 9:22 am
by garvinhicking
Did you think about putting your site HTML just inside the template/index.tpl template using Smarty/HTML markup? You could even do a Smarty include...

Basically what could be done with embedding previously is now best done using Smarty, as there is no longer a need to use a wicked output buffering to inject your own HTML. :)


Posted: Thu Jul 14, 2005 2:55 am
by vincem
Well Garvin,

Thanks to your suggestion, I've pretty much solved my issues. The template/index.tpl was indeed where I needed to work. I've added some of my HTML content there, and adapted the rest to fit inside the style.css of the template.

A strange thing happens, though. My main upper menu is javascript based and I've included it in the HTML part of the above mentioned file. On first load, i.e. when loading the main blog page, the menu loads correctly.

But on subsequent pages, either archives, categories or older entries for instance, the page loads well with the correct url this time, but the menus fail to appear. Everything else on the page seems to be drawn correctly, including my added HTML footer. I also had the same problem with a DIV background image for the header, before I decided to put it inside the blog's serendipity_banner part. Text in the same DIV was loading, but not the image, or the menu.

Any way, I consider myself happy for now, I might play with it some more when I have a chance...

Thanks again for the advice!

Posted: Thu Jul 14, 2005 2:26 pm
by garvinhicking
vincem, this sounds like a javascript loading issue. Check your javascript console and if it generates errors?


Posted: Thu Jul 14, 2005 3:35 pm
by vincem
Nah, already checked that. I get warnings, but no errors. Besides, when the first page loads correctly, I get quite a few warnings about the menu script, proving that it's loading, but on the second page, no warnings at all, so for some reason I assume the script is simply not being run again...

Don't worry though, I hate to waste your time with that, it's no big deal for now, I've always had a HTML nugget to redirect users to the main, menu equipped page, so it's no difference ;-)))


Posted: Thu Jul 14, 2005 4:01 pm
by garvinhicking
Vincem, if you tell me your URL I could have a look at the error. I bet you use relative paths to reference your Javascript, but you should use an absolute path. :)


Posted: Thu Jul 14, 2005 4:17 pm
by vincem
Hey Garvin, I really appreciate your time!

I am using absolute paths because I know the answer to the meaning of life is 42 ;-)

However, here's the url that works fine (notice the menu in the header, below the Portal title, it's positionned with absolute coordinates and independant from any HTML tag):

And here's one of the urls that won't load the menu (or from the working main page, go to any secondary page, archives, categories, etc):

And for reference, here's the url to my index.tpl: ... /index.tpl

Cheers, Vince

Posted: Thu Jul 14, 2005 6:52 pm
by garvinhicking
Hehe. Just what I thought. :-)

You need to replace this:

Code: Select all

<link rel="stylesheet" href="../styles/pop_style2.css" type="text/css"/>
<link rel="stylesheet" href="../styles/main_blog.css" type="text/css"/>

<script src="../scripts/pop_core.js" type="text/javascript"></script>
<script src="../scripts/pop_rocks2.js" type="text/javascript"></script>
<script src="../scripts/pop_events.js" type="text/javascript"></script>

with this:

Code: Select all

<link rel="stylesheet" href="/styles/pop_style2.css" type="text/css"/>
<link rel="stylesheet" href="/styles/main_blog.css" type="text/css"/>

<script src="/scripts/pop_core.js" type="text/javascript"></script>
<script src="/scripts/pop_rocks2.js" type="text/javascript"></script>
<script src="/scripts/pop_events.js" type="text/javascript"></script>

Note that I removed the ".." to the path so that it's absolute.

If you are in the folder "/blog/index.php" that means you can use "../" to get to "/scripts". But if you are calling the url with "/blog/archives/2005/07.html" this means with "../" you are accessing "/blog/archives/scripts/" - and that directory doesn't exist of course. :)

Hope I explained that well enough! :)

Have fun,

Posted: Thu Jul 14, 2005 7:14 pm
by vincem

Yep, that did it. That'll teach me not to make smart ass jokes about the meaning of life ;-) How humbling to receive such a basic - but rather crucial - lesson in HTML after messing with it for so many years!

Thanks Garvin, help much appreciated!


Posted: Thu Jul 14, 2005 10:25 pm
by garvinhicking
You're most welcome. I didn't want to "humble" you, so no offense or whatever taken. I just wanted to ensure you'll be having fun with Serendipity.

Did I already mention I love the look of your site? :)