Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Fatal error: Cannot redeclare vbseo_thread_seotitle() (not closed yet)

  1. #1

    Exclamation Fatal error: Cannot redeclare vbseo_thread_seotitle() (not closed yet)

    Sorry but it is not closed.

    Like I said, I DID the file changes (see code below) and uploaded it (and yes, I overwrote the old one).

    Code:
    if (!function_exists("vbseo_thread_seotitle")) {
    function vbseo_thread_seotitle(&$vbseo_gcache_thread)
    {
    global $vbphrase;
    if (!isset($vbseo_gcache_thread['seotitle']))
    {
    $ttl = ($vbseo_gcache_thread['title'] ? $vbseo_gcache_thread['title'] : $vbseo_gcache_thread['threadtitle']);
    if(VBSEO_URL_THREAD_PREFIX && 
    ($prefid = $vbseo_gcache_thread['prefixid']) )
    $ttl = (VBSEO_URL_THREAD_PREFIX_NAME ? $vbphrase["prefix_".$prefid."_title_plain"] : $prefid) . ' ' . $ttl;
    $vbseo_gcache_thread['seotitle'] = vbseo_filter_replace_text ($ttl);
    }
    }
    }
    I set the vbseo option Keep Non-English Characters in URLs
    Replace the 'META KEYWORDS' Content? is turned off.

    Link Type is set to: VBSEO_URI

    htaccess entries are added

    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} !^www\.patientenfragen\.net$
    RewriteRule (.*) http://www.patientenfragen.net/$1 [L,R=301]
    
    RewriteRule ^/?(en|de)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/index.php [L,QSA]
    RewriteRule ^/?(en|de)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    uploaded and the error is displayed.

    So please advice

    Thank you

    StarBuG
    Last edited by StarBuG; 12-12-09 at 10:54.

  2. #2
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    The only reason why this communicate can be displayed is that vbseo_thread_seotitle function is declared twice. That is why it is necessary to add this one if statement. All other configurations have nothing to to with this issue.

    Please make sure that after changes you uploaded file in appropriate place (I know you wrote you did, just please check it on server side does it have what it needs).

    If you are 100% sure then please PM me access details to your FTP.

  3. #3

    Default

    FTP Access is not possible, sorry.
    Let me know what you need to know and I'll provide it.

    I attached the file as zip archive.

    I hack vBulletin files for nearly 10 years now.
    Adding two line of codes is not that hard you know.

    There must be a problem somewhere else

    ps: The file I attached I downloaded from my live forum about 20sek ago
    pps: I had vBSEO 3.3.1 running and just upgraded to 3.3.2. Same problem there after the changes.
    ppps: my charset is: ISO-8859-1 (german) I hope that is not a problem
    Last edited by StarBuG; 12-12-09 at 19:11.

  4. #4

    Default

    Ok I found a partial solution for the problem.

    My Charset was set with upper case letters (ISO-8859-1)
    After I changed it to all lower case vBET works except for the main forum page.
    (You should include that into your installation manual or change the code so that it works with upper case letters too )

    At first I thought the entries in Define Homepage Aliases were the problem,
    but even without entries the forum home page did gave the same error message.

    In specific:
    If Define Homepage Aliases is empty, only English (the translation having domain.de/en/ as main forum page) works
    my main language (domain.de) does give the error.

    If I add the entries index.php and index.php? to Define Homepage Aliases then the /en/ part gets striped from the url and both English and German don't work.

    Please advice

    ps: leaving Define Homepage Aliases empty gives me a little stomach ache because that is a serious PR leak if 3 main forum urls (index.php, index.php? and /) are present
    Last edited by StarBuG; 12-12-09 at 19:53.

  5. #5
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Hi.

    Glad to hear you are step closer, and still sorry it happens to be so painful in your case. Hope that enjoying vBET when it finally runs will cover all those troubles

    About lower and upper case - it has matter only for utf-8 charset and it is described in manual. Your change had nothing to do with "Cannot redeclare vbseo_thread_seotitle()" - since you are in php for so long you imagine that this communicate clearly says that function was already declared anc cannot be redeclared. So it should be coincidence, but the good message it that you do not have this issue anymore.

    About the new one. Please make sure that you have good vBET configuration and .htaccess - especially when your forum is in subdirectory in URL. vBET options in Main category are important - check those and read descriptions - do not use any if it is not appropriate.
    I cannot tell you to much more since you didn't gave the error message, or real forum URL. Please PM me address of your forum so I will be able to see this behavior.

  6. #6

    Default

    Hi

    My Forum is www.patientenfragen.net
    The forum does not run in a subdirectory.

    The Main settings are:

    Google API Key (problem with and without key)
    Forum language: german
    forum directory: empty
    forum main domain: empty
    link type: VBSEO_URI
    translation link types: Create URL's according to SEO link consensus (i.e. '/en/address')
    keep directories: empty

    .htaccess
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    Options +FollowSymLinks
    RewriteEngine On

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    RewriteBase /

    RewriteCond %{HTTP_HOST} !^www\.patientenfragen\.net$
    RewriteRule (.*) http://www.patientenfragen.net/$1 [L,R=301]

    RewriteRule ^/?(en|de)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/index.php [L,QSA]
    RewriteRule ^/?(en|de)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron|vbseo_sitemap|mrdump)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    I can't show you the behaviour live because then my forum would not work for that time.

    Please advice

    ps: I tested upper and lower case and still works. Don't know why it worked better after the first change.

  7. #7
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    About why it didn't work after first charset change - as I wrote it was coincidence, I have few theories what happen then (I know that you handle this - those ale only general theories about such issue not about you and your case):
    - file could be changed in wrong way
    - file could be uploaded before changes was saved
    - file could be uploaded to server in wrong directory, so vBSEO still saw the old one
    - server get stupid and ignored that new version of file occurs working still on old one (this sometimes happens - good cure is save file again and upload it again)

    But the point is - this part is working now

    About actual issue - right now vBET is disabled so I'm not able to see behavior. Is it possible that you turn it on and do not show flags (custom place) - so users will not go there and I will be able to check it manually?

    Your vBET configuration seems to be ok, also .htaccess file. One forum had something similar, but they mess something in vBSEO configuration and vBSEO staff fixed it. Please check does vBSEO can mess this by custom redirects. You can also check does commenting "RewriteBase /" help - but it is just shooting.

    At this moment I cannot tell you more. I will have to see it and maybe I will need access to provide you more support. Please at least give me error communicate which you see when you want to translate main page. Also please note that you shouldn't add to URL language of your default forum language (it doesn't work this way - for default you just have normal links).

    Also I'm little lost with your issue description that is why touching it would be much better. If you are aware about security issues then you can create temporary accounts for support or made test forum with same configuration. We will gladly give you our full support, but you have to allow us for this. At this moment we can only guess what really happens.
    Last edited by vBET; 13-12-09 at 20:43.

  8. #8
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    And another shot - looking on your default vBSEO rules please try to change:
    Code:
    RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]
    To:
    Code:
    RewriteRule ^(.+)$ vbenterprisetranslator_seo.php [L,QSA]

  9. #9

    Default

    The error message I get on the main page is

    Fatal error: Cannot redeclare vbseo_thread_seotitle() (previously declared in /path/vbenterprisetranslator_seo.php:40) in /path/vbenterprisetranslator_seo.php on line 43
    I can't demonstrate this behavior to you because then my forum would not work, even when flags are removed.
    The error is always present on the main forum page with and without translation. All other pages work fine.
    I can view sub forums, threads in both languages so on that end vBET works fine.
    Only when I try the main forum page which is www.patientenfragen.net the error shows and the page does not load.
    It does not matter if I access it via domain directly or the translated version www.patientenfragen.net/en/
    My main language (which is domain.net not domain.net/de/) as well as the english translation is not working when htaccess changes are present.

    Your htaccess suggestion does not help.
    Also removing rewritebase does not do the trick.

    My vBSEO custom rewrite rules are:
    '^index\.php\?page=regeln' => 'regeln.html'
    '^index\.php\?page=impressum' => 'impressum.html'
    '^index\.php\?page=agb' => 'nutzungsbedingungen.html'
    '^index\.php\?page=datenschutz' => 'datenschutzerklaerung.html'
    '^index\.php\?page=notfallnummern' => 'notfallnummern.html'
    '^index\.php\?page=links' => 'links.html'
    '^index\.php\?page=impfkalender' => 'impfkalender.html'
    '^werbung\.php' => 'werbung.html'
    '^vbglossar\.php\?do=showentry&id=(\d+)&title=(.*)&catid=(\d+)&cattitle=(.*)'=>'lexikon/$2-$1/$4-$3.html'
    '^vbglossar\.php\?do=(.*)&id=(\d+)&title=(.*)&catid=(\d+)&cattitle=(.*)'=>'lexikon/$3-$2/$5-$4-$1.html'
    '^vbglossar\.php\?do=showcat&catid=(\d+)&cattitle=(.*)'=>'lexikon/$2-$1/'
    '^vbglossar\.php'=>'lexikon/'

    '^private\.php\?do=showpm&pmid=(\d+)' => 'private-nachrichten/$1.html'
    '^private\.php' => 'private-nachrichten/'

    '^faq\.php\?faq=vb_faq' => 'hilfe/vbulletin/'
    '^faq\.php$' => 'hilfe/'

    '^calendar\.php$' => 'kalender/'
    '^calendar\.php\?c=1$' => 'kalender/'
    '^calendar\.php\?(c=1&)?do=(display.+?)(&year=)?$' => 'kalender/$2/[NF]'
    'calendar\.php\?(c=1&)?nojs=1' => 'kalender/nojs/[NF]'
    'calendar\.php\?(c=1&)?do=(display.+?)&nojs=1' => 'kalender/$2/nojs/[NF]'
    'calendar\.php\?(c=1&)?week=(\d+)&nojs=1' => 'kalender/woche-$2/nojs/[NF]'
    'calendar\.php\?(c=1&)?month=(\d+)&year=(\d+)&nojs=1' => 'kalender/$3/$2/nojs/[NF]'
    '^calendar\.php\?do=getinfo&(c=1&)?day=(\d+)-(\d+)-(\d+)(&c=1)?$' => 'kalender/$2/$3/$4/'
    '^calendar\.php\?do=getinfo&e=(\d+)(&day=[0-9\-]+)?(&c=1)?$' => 'kalender/ereignis-$1/'
    '^calendar\.php\?(s=&)?(c=1&)?(week=&)?month=(\d+)&year=(\d+)(&c=1)?(&do=displaymonth)?$' => 'kalender/$5/$4/'
    '^calendar\.php\?c=1&week=(\d+)(&do=displayweek&month=.+?)?$' => 'kalender/woche-$1/'
    Giving you access to my life site is not possible for security reasons, sorry (even Jelsoft Staff does not get access from me).

    Let me know which infos you need and I am happy to provide them to you.

    I can email you my vbseo_all.xml settings if you think it is a vbseo conflict. Just send me your email via PM
    Last edited by StarBuG; 14-12-09 at 09:55.

  10. #10

    Default

    When I set Force Forum Root as Homepage? to NO then patientenfragen.net/en/ does work
    as well as patientenfragen.net/en/index.php

    however patientenfragen.net (german, the main language) still does not work (see error message above)

    BUT patientenfragen.net/index.php does work

    Any more ideas?

    If you have MSN or ICQ send me your ID and I can show you the behavior live

    ps:
    I DON'T want to use index.php nor index.php?

    I removed them from Define Homepage Aliases when I installed vBET but I really don't like it.
    Please change that for the future.
    This is a serious PR leak issue!
    Last edited by StarBuG; 14-12-09 at 10:15.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •