Debug notice in file /phpbb_seo/phpbb_seo_class.php

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

Moderator: Moderators

Debug notice in file /phpbb_seo/phpbb_seo_class.php

Postby IPB_Refugee » Tue Nov 25, 2008 10:13 am

Hello,

my moderator encountered a strange problem: When we visit a certain forum of our board or a subforum of the mentioned forum, we get this debug notice:

[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 467: Undefined index: t


This debug notice is repeated 6 respectively 32 times - it seems to depend on the number of topics in the forum/subforum. And as I said, it only happens in a certain forum and its subforum, not in the complete board.

These are the lines 454-473 in my phpbb_seo_class.php:

Code: Select all
   function viewtopic_adv() {
      global $phpbb_root_path;
      $this->filter_url($this->seo_stop_vars);
      $this->path = $this->seo_path['phpbb_urlR'];
      if ( !empty($this->get_vars['p']) ) {
         $this->url = $this->seo_static['post'] . $this->get_vars['p'] . $this->seo_ext['post'];
         unset($this->get_vars['p'], $this->get_vars['f'], $this->get_vars['t'], $this->get_vars['start']);
         return;
      }
      if ( !@empty($this->seo_url['topic'][$this->get_vars['t']]) ) {
         // Filter default params
         $this->filter_get_var($this->phpbb_filter['topic']);
         $this->{$this->rewrite_functions[$phpbb_root_path]['topic_pagination']}($this->seo_ext['topic']);
         $this->url = $this->seo_url['topic'][$this->get_vars['t']] . $this->seo_delim['topic'] . $this->get_vars['t'] . $this->start;
         unset($this->get_vars['t'], $this->get_vars['f'],$this->get_vars['p']);
         return;
      }
      $this->path = $this->seo_path['phpbb_url'];
      return;
   }


Line 467 is:

Code: Select all
         $this->url = $this->seo_url['topic'][$this->get_vars['t']] . $this->seo_delim['topic'] . $this->get_vars['t'] . $this->start;


I use Advanced SEO URL, No dupe, Zero dupe and Optimal titles MOD.

Regards
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Advertisement

Postby SeO » Tue Nov 25, 2008 11:41 am

mm this should not occur, since $this->seo_url['topic'][''] and $this->seo_url['topic'][0] should never be filled, but ho well, I guess we should keep the checks performed in 0.4.4 for this case.

Replace :
Code: Select all
      if ( !@empty($this->seo_url['topic'][$this->get_vars['t']]) ) {

with :
Code: Select all
      if ( !empty($this->get_vars['t']) && !empty($this->seo_url['topic'][$this->get_vars['t']]) ) {


Won't fix the guilty call with t=0 (or t=''), but will prevent the notice and leave the url un-rewritten.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby IPB_Refugee » Tue Nov 25, 2008 12:00 pm

Great - the debug notices disappeared. Thank you! :)

Regards
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby GoBieN » Fri Nov 28, 2008 7:14 pm

Just to mention, i have the same errors, on my portal page after update to premod 3.0.3

Used fix suggested here, errors still the same.
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /phpbb_seo/phpbb_seo_class.php on line 400: Undefined index: t
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3788: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3186)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3790: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3186)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3791: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3186)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3792: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3186)

But the whole portal isn't working since 3.0.3
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby IPB_Refugee » Fri Nov 28, 2008 7:19 pm

Hi,

is your line 400 the same as my line 467 (please see above)?

Regards
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby GoBieN » Fri Nov 28, 2008 7:23 pm

$this->url = $this->seo_url['topic'][$this->get_vars['t']] . $this->seo_delim['topic'] . $this->get_vars['t'] . $this->start;

line 400
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby IPB_Refugee » Fri Nov 28, 2008 7:48 pm

Hi,

this line occurs twice in phpbb_seo_class.php. So propably we should also change

Code: Select all
      if ( !@empty($this->seo_url['topic'][$this->get_vars['t']]) && !@empty($this->seo_url['forum'][$this->get_vars['f']])) {


to

Code: Select all
      if ( !empty($this->get_vars['t']) && !@empty($this->seo_url['topic'][$this->get_vars['t']]) && !@empty($this->seo_url['forum'][$this->get_vars['f']])) {


in function viewtopic_uadv. Please let me know if it works for you.

Regards
Wolfgang
User avatar
IPB_Refugee
PR0
PR0
 
Posts: 82
Joined: Thu Jul 24, 2008 2:18 pm

Postby GoBieN » Fri Nov 28, 2008 8:17 pm

IPB_Refugee wrote:Hi,

this line occurs twice in phpbb_seo_class.php. So propably we should also change

Code: Select all
      if ( !@empty($this->seo_url['topic'][$this->get_vars['t']]) && !@empty($this->seo_url['forum'][$this->get_vars['f']])) {


to

Code: Select all
      if ( !empty($this->get_vars['t']) && !@empty($this->seo_url['topic'][$this->get_vars['t']]) && !@empty($this->seo_url['forum'][$this->get_vars['f']])) {


in function viewtopic_uadv. Please let me know if it works for you.

Regards
Wolfgang


Errors are gone now.
Still have to fix the portal.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby SeO » Sat Nov 29, 2008 8:10 am

GoBieN wrote:Still have to fix the portal.


Could you tell us a bit more ?
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby GoBieN » Sat Nov 29, 2008 5:14 pm

SeO wrote:
GoBieN wrote:Still have to fix the portal.


Could you tell us a bit more ?

Let me explain what i have done.
I had a working (premod based) board on version 3.0.2 with stargate portal mod on it (v 0.3.0) and some others (gallery, phoogle, quick reply, ....)

For the upgrade to phpBB & premod v3.0.3 i did these steps:
  • Disable SEO rewriting
  • Downloaded and ran AUTO UPDATE package from phpBB.nl (for dutch & english language changes).
  • Downloaded and ran AUTO UPDATE package from phpbb-seo.com


After the upgrade board works fine, but portal is broken.
When i view the portal page (when i'm logged in) i get a blank page with nothing on it. When i view the portal page when not logged in i first got the SEO errors mentioned above. After the fix from above (2 times), i don't see errors as guest but just also blank page.

So conlusion, the SEO errors are solved, but my portal is still broken ;)
So i still have to fix that, but phpBB-SEO is working fine now.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby SeO » Sun Nov 30, 2008 10:23 am

A blank page like this, in case you cannot see any error message even with debug activated, often is related to issues in the language packs, make sure that all yours are up to date, with no file missing.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby GoBieN » Sun Nov 30, 2008 8:27 pm

SeO wrote:A blank page like this, in case you cannot see any error message even with debug activated, often is related to issues in the language packs, make sure that all yours are up to date, with no file missing.

Thanks for the information. I will look in to this. At the moment i have a more urgent problem. Will open new topic. Sorry for hijacking this one.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Bing [Bot] and 3 guests