jump to page function on viewtopic goes to 404 error

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

jump to page function on viewtopic goes to 404 error

Postby Elephantspike » Sun Jan 04, 2009 12:26 pm

With my current adv mod rewrite rules in .htaccess in place, when there is a multiple page thread, when you click on that "page x out of y" link next to the pagination numbers, that opens that javascript box where you type in the page number you want to go to, it goes to a 404 error page because it is trying to go to a page like this:

The requested URL /forum/have-a-nice-day-t16816.html&start=15


Not found on the server (of course)

Do I just need to tweak something in my seophpbb module in my ACP or maybe something in forum_fn.js or viewtopic_body.html?

Thanks
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Advertisement

Postby SeO » Sun Jan 04, 2009 4:27 pm

This is most likely because you did not (fully) implemented the template code change on all your styles.

The code change dealing with fixing this deal with the jumpto() js function, either located in forum_fn.js (prosilver based) or overall_header.html (subsilver2 based).
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Sun Jan 04, 2009 8:59 pm

I'm using prosilver_se as my default style and prosilver and subsilver2 as alternate style options. This "jump to page" script behaves the same on all three styles.

I have lots of mods and some extra javascript in there for my dropdown menus and a random banner link rotator.

This is the overall_header.html code in my prosilver_se template:

Code: Select all
too much code
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Mon Jan 05, 2009 9:49 am

Then, prosilver_se must be based on prosilver and thus, the prosilver code change must match pretty well, have you tried to apply them ?
Same for subsilver2, the code change are provided in the install.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Tue Jan 06, 2009 12:42 am

Oh, yes. The code changes have been applied to all styles. That was the first thing I triple-checked before I posted. Also, the jumpbox is not working in any of my three styles.

Thanks.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Tue Jan 06, 2009 1:07 pm

Have you cleared your template's cache in the style acp once the edit where done ?

Try to do it one more time.

Could you post the url to your forum ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Tue Jan 06, 2009 7:26 pm

Yes, the cache has been cleared over and over again. This is a heavily modded version of phpBB3, so I'm used to constantly clearing the cache everytime I change anything.

I think some other MOD I have may be some how messing-up the redirect from MOD rewrite on the jump to function.

MODS I have on this board:

Stargate Portal (started out w/ the premod of this), Adv MOD rewrite, GYM Sitemaps & RSS, User Blogs (w/blogs converted form The Blog Mod on the old phpBB2 board), phpbb gallery (albums converted form Smartors on the old board), Ad Management, Anti-spam ACP, Cash Mod, Custom Titles, Ajax Chat, Paypal Donate, dropdown headerbar menus, dw random image rotators.

I PMd you a link

Thanks,

Bob
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Thu Jan 08, 2009 8:56 am

As I though, you are just missing the code in :
forum/styles/js/forum_fn.js

You currently have :
Code: Select all
/**
* Jump to page
*/
function jumpto()
{
   var page = prompt(jump_page, on_page);

   if (page !== null && !isNaN(page) && page > 0)
   {
      document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
   }
}



And you should have :
Code: Select all
/**
* Jump to page
*/
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
   var page = prompt(jump_page, on_page);
   if (page !== null && !isNaN(page) && page > 0) {
      var seo_page = (page - 1) * per_page;
      if ( base_url.indexOf('?') >= 0 ) {
         document.location.href = base_url.replace(/&/g, '&') + '&start=' + seo_page;
      } else if ( seo_page > 0 ) {
         var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
         if (seo_type1 !== null) {
            document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1;
         }
         var seo_type2 = base_url.match(/\/$/);
         if (seo_type2 !== null) {
            document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination;
         }
      } else {
         document.location.href = base_url;
      }
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END


;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Sat Jan 10, 2009 2:03 am

Thank you for having a look.

I only wish it were as simple a thing as an overlooked file edit, but I did have that edit in the forum_fn.js files in both prosilver and my board's default prosilver_se template folders. The jump to page # link didn't work on view_topic pages, so to experiment I tried changing the file back the way it was before the adv mod rewrite edits (result: No difference).

When I saw your above post, I checked my files and found that I had forgotten to change the forum_fn.js file back to have the mod rewrite edits in prosilver. The edits were still in place for the default prosilver_se all along, though. Maybe it has something to do with template inheritance that you were seeing the forum_fn.js without the edits from prosilver while viewing the board using prosilver_se? I don't know, though because forum_fn.js is one of the files that comes with prosilver_se.

Anyway, in a nutshell:

The mod_rewrite edits are back in place on both templates and the jump to page# links don't work in either style. They are trying to find a url that is formatted as a .html page with php variables at the end.


Thanks.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby dcz » Sat Jan 10, 2009 9:52 am

Have you properly moded overall_header.html ? Because some vars are parsed there and required later in jumpto().

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21428
Joined: Fri Apr 28, 2006 9:03 pm

Eureeka!

Postby Elephantspike » Sun Jan 18, 2009 9:56 pm

Fixed!

I had two issues I needed to spot and fix, both regarding adjustments needed to make this advanced mod rewrite work with Stargate Portal:

1) Stargate gives you a JS folder inside your top styles directory. This js folder contains a forum_fn.js file that exists along with the forum_fn.js files inside the template folder of each of your prosilver based style folders. The edits for styles/prosilver/template/forum_fn.js for this mod need to also be done to the styles/js/forum_fn.js file as well in order for it to work with Stargate Portal.

2) I did indeed do the prosilver overall_header.html edits, but this one:

Code: Select all
#
#-----[ FIND ]------------------------------------------
#

   var onload_functions = new Array();
   var onunload_functions = new Array();

#
#-----[ AFTER, ADD ]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   var seo_delim_start = '{SEO_START_DELIM}';
   var seo_static_pagination = '{SEO_SATIC_PAGE}';
   var seo_ext_pagination = '{SEO_EXT_PAGE}';
   // www.phpBB-SEO.com SEO TOOLKIT END


I did twice. The reason? Stargate has an edit that puts this:

Code: Select all
/**
* New function for handling multiple calls to window.onload and window.unload by pentapenguin
*/
var onload_functions = new Array();
var onunload_functions = new Array();


into the overall_header.html file. I must have went back to recheck my edits and found this second
Code: Select all
var onload_functions = new Array();


That is from Stargate and thought that I had omitted the edit for mod rewrite that goes after the

Code: Select all
var onload_functions = new Array();


in the vanilla phpbb3 instalation. It of course doesn't need to go in the pentapenguin script from Stargate.

I still can't seem to make the jump to page link work in subSilver though. It redirects back to the forum index, but that will have to be another breakthrough for another day.

Thanks.
Last edited by Elephantspike on Wed Jan 21, 2009 1:27 pm, edited 1 time in total.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Mon Jan 19, 2009 11:39 am

Looks like you are trying the prosilver code changes on subsilver2, or am I missing something ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Mon Jan 19, 2009 7:33 pm

No, the above edits refer to changes to the prosilver based templates. I realize that the subsilver2 edits are different, but they aren't quite working for the go to page link either.

I think there is just some different adjustment I need to make to the subsilver2 edits for this mod, probably also something related to Stargate, I'm guessing. Subsilver2 doesn't use external stylesheets, so its a different fix for that style.
Last edited by Elephantspike on Wed Jan 21, 2009 1:29 pm, edited 1 time in total.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Postby SeO » Wed Jan 21, 2009 8:11 am

Be sure about one thing, the code change for prosilver and subsilver2 are working ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Elephantspike » Wed Jan 21, 2009 1:23 pm

SeO wrote:Be sure about one thing, the code change for prosilver and subsilver2 are working ;)


Of course they are, I am sure.

It is just something in Stargate Portal that might make it necessary for me to adjust something in these code changes in the case of my board.

Thanks for looking.
Elephantspike
 
Posts: 41
Joined: Mon Mar 26, 2007 3:39 pm

Next

Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests