Hi,
I'm running the Hobbit theme, and there is no captcha visible upon registration... here's the site: http://www.die-erben-mittelerdes.de/smf
Besides the graphics and a few (hardcoded) menubuttons I didn't change anything so far
Hi TauTau,
Welcome to TinyPortal.
When you have a support problem we ask that you Please Read and Follow the Posting Guidelines (http://www.tinyportal.net/index.php/topic,581). At the bottom of that topic, there is a template for you to cut out and paste into your original post in your support topic so that we can get as much information as possible in order to help you quickly without having to ask a bunch of questions. I will ask you to do that now, and be sure to include any errors that are in your Forum Error Log.
Normally the first thing you should do when something like this is happening is to check to make sure it's not happening in the SMF Default Core Theme. I have been able to verify on your site that it is indeed happening on the Core Theme as well so it is not an issue with the Hobbit theme. Because of this, this would normally be an SMF issue.
However, this same thing happened to me on my test site after I did some edits to fix a known error in TP 1.0 beta 4. Therefore, here is what I'm going to ask you to do ...
Please download the TPmodules.php file from the following location to you computer ...
.../public_html/smf/Sources/TPmodules.php
After you have downloaded it, please attach that file to your next post in this topic so that I can look at it.
In the meantime, because this issue has nothing to do with the Hobbit theme, I will move this topic to our Support Board.
Thanks,
ZarPrime
EDIT: I can't remember if this Forum will let you attach a php file or not, though I think it does. If it won't, then please put the TPmodules.php file into a zip file and attach it instead.
Thanks a lot... First, here's the requested data:
Link to my site: http://www.die-erben-mittelerdes.de/smf
SMF version: 1.1.9
TP version: v1.0 beta 4 (though I noticed there is a new build?)
Theme name and version: Hobbit
Browser Name and Version: firefox 3.0.11
Mods installed: none
Related Error messages: none
and I attach the modules php file. Maybe this is also related to not being able to get the shoutbox to work?
Edit: Ok, I found an Error regarding the Shoutbox, but none regarding the captcha:
8: Undefined offset: 1080
Datei: /var/www/web4/web/smf/Themes/default/languages/TPShout.german-utf8.php (main_above sub template - eval?)
Zeile: 489
(sorry, I didn't immediately find the Error log, SMF is quite new to me ;))
sorry, I didn't understand anything
OK, give me a few minutes to look at that file and I'll be back. We'll deal with the Shoutbox problem in another topic, so go ahead and feel free to post another topic about that if you want, again attaching your information there and detailing the exact problem.
ZarPrime
Fussilet,
It's not an issue with the Hobbit theme because it's happening in the SMF Core theme as well.
ZP
ok ZarPrime ;)
TauTau,
OK, there are no errors in that file so before I send you to SMF to get this sorted out let me ask you another question.
In your OP, You said you made edits to add a few menubuttons. Do you remember what file or files you edited to do this? If so, what were they? Also, how did you make the edits? Did you do it online in an FTP program or did you D/L the files to your Computer and do the edits locally? If you did the edited on your computer, what program did you use to do the edits?
If you can remember what files you edited, please attach those here and tell me if they were from the SMF Core Theme folder or from the Hobbit theme folder.
Is that error you edited into you OP the only one you have in the Error Log?
ZarPrime
I edited index.template.php with the respecting menu-point. I guess that should be the theme file, because I could verify the same code in my local version here. I just translated one button and removed another one like this:
// Show the [Dosyalar] button.
echo '<li', $current_action == 'downloads' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=downloads"><b>' , Dosyalar , '</b></a></li>';I got a few more errors, but all regarding the Shoutbox module:
Quote8: Use of undefined constant Downloads - assumed 'Downloads'
Datei: /var/www/web4/web/smf/Themes/default/languages/TPShout.german-utf8.php (main_above sub template - eval?)
Zeile: 447
OK, if that was the only file you edited and it was not from the SMF Default theme then, that should not keep your Capcha from working in the Default theme, and it isn't working. Because of this, I need for you to go to the SMF site at http://www.simplemachines.org/community/index.php?board=9.0 and post a topic in the Support Board and see if they can help you with this issue.
The other thing you might try first though is to make a backup of that file and copy the original index.template.php from the theme back into the correct folder and then check to see if Capcha works. If it does, then you probably made a mistake when you added the download button. Let us know what happens.
ZarPrime
For everybody else who is wondering why I thought this may have been caused by a file edit to correct a TP error, the same thing happened to FUBAR when he edited the TPmodules.php file and it added 2 blank lines into the file when he edited it. This happened to me as well when I tried to correct the smileysEnabled error so I knew what to look for. The fix was to fix the error in a program that won't add the extra lines, like context, a program that will save php files correctly. After I fixed the error and saved it correctly my Captcha started working fine again. If you are interested in reading FUBAR's topic on SMF the link is here ...
http://www.simplemachines.org/community/index.php?topic=313434.msg2081300#msg2081300
ZarPrime
TauTau,
Also, the error you mention is probably because of an error in one of your German Language files. You might want to default you Forum to English Language and check to see if that error still happens.
ZarPrime
You can indeed see it is the German language causing the problem by viewing the page in English.
http://www.die-erben-mittelerdes.de/smf/index.php?action=register;language=english
ok, I took a look now at the file mentioned in the error log (already got 138 pages of error messages, and that's without many users accessing ;)). The file smf/Themes/default/languages/TPShout.german-utf8.php merely contains txt variables, and I never touched it. The error messages however tell something about constants and offsets, none of which is defined there.
What I find a bit strange also, is that the files are referenced from /smf/Themes/default, is that the normal behaviour? Shouldn't they be used from the used theme folder?
Since I got no error message from the captcha problem, and it indeed is caused by the language as IchBin found out, what language file could be of problem there? (though I assume that also would be only defined txt variables, and how could there be an error?)
Since all files used besides the Theme are official downloads and untampered, why am I the only one having that problem? Everyone else still using ISO8859?;)
Edit: I switched the site to english, and it seems the Shoutbox problem is still something different:
Quote
8: Undefined offset: 1080
File: /var/www/web4/web/smf/Themes/default/languages/TPShout.english.php (main_above sub template - eval?)
Line: 489
Still playing around... I got to the point, where the Shoutbox works when set to english. I removed all the offending button definitions from index.template.php (seems it really IS a theme problem):
for example, this
echo '<li', $current_action == 'forum' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=forum"><b>' , Forum , '</b></a></li>';caused a "undefined constant Forum" Error. I have no idea why that is, since to me this looks like pure html code, where "Forum" just is text.
This one
echo '<li', $current_action == 'links' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=links"><b>' , $txt[1080] , '</b></a></li>';
caused the "illegal offset 1080" Error. Coming from perl, this goes beyond my php knowledge, is that how a offset within a string is defined? Obviously 1080 seems a bit high ;)
Though, commenting all those out, I got it working in english with the shoutbox and captcha.
As soon as I switch to german-utf8 though, the shoutbox and captcha are gone. Seems the code is really woven between all those files, I have no idea where to trace that down...
Is it safe to assume that the problem now is down to SMF? Since there always was TPShout.german-utf-8.php referenced, I'm not so sure about this...
I also got another error message, but can't reproduce it (it looks like a module problem though):
Quote
http://www.die-erben-mittelerdes.de/smf/index.php?action=tpmod;shout=admin
Apply Filter: Only show the errors with the same message
2: Illegal offset type in isset or empty
File: /var/www/web4/web/smf/Sources/TPmodules.php
Line: 1994
the offending line is this:
elseif($precode == 'tpmod='){
if($context['TPortal']['action']=='tpmod' && isset($_GET[$body]))
$show=true;
}
so, I got a bit further. After searching the SMF forums for a while, I found something captcha related, and it made me curious:
http://www.simplemachines.org/community/index.php?topic=313567.0
that user just did an upgrade and then captcha didn't work anymore. So I installed the filecheck tool from here
http://www.simplemachines.org/community/index.php?topic=300626.msg1989826#msg1989826
and found that a lot of the TP.german-utf8 files were saved as UTF-8 BOM (that is with signature). I opened that files with notepad2 and set the encoding to UTF, and now the captcha shows also up with german language. Also a lot of the TPsomething.php files had trailing newlines, dunno if that is really important, but I cleaned it up. The shoutbox still doesn't come up though.
The language files I used are the ones from the download section here, so maybe the maintainer should take a look at them...
Edit: correction, the shoutbox also comes up now (gotta enable it, too ;))
Any time you see PHP code go from single quote to comma, and then comma to single quote, it is telling you to escape to PHP and then back. And since you have only put the word 'forum' in between there, PHP assumes you are using PHP. Since you have no dollar sign indicating a variable, it assumes you are using a constant. Hence the constant error. All you need to do is get rid of the single quote and commas and make your line look like this:
echo '<li', $current_action == 'forum' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=forum"><b>Forum</b></a></li>';
In order to figure out why the language files are causing the problem, I would take them all out, and add one by one back in until you see the problem again.
You know that you have to check the languages for your blocks to show ?
English will always show, but if you have set your forum to use german, you need to name the block and activate it for german language to.
Edit the blocks one by one and name them in your language and save, that will bring in the block when you switch to German
TauTau,
The trailing newlines does indeed seem to be the problem. There seems to be a problem with dynamic images like the Captcha image when those 2 extra lines are saved in the php files.
When did you download the German Language Packs? The latest ones approved for YP 1.0 Beta 4 were approved and uploaded only 3 days ago (June 12th). Are these the ones you got? If there is a problem with the UTF8 package then maybe G6 will see this and step in here as she remade the UTF8 package after The_Gentleman uploaded them, but I'm not sure what she did. I will ask her to take a look at this topic.
The latest Language Packs that were uploaded the other day are in the download section ...
TP Beta4 German ISO Translation ...
http://www.tinyportal.net/index.php?action=tpmod;dl=item1112
TP Beta4 German UTF8 Translation ...
http://www.tinyportal.net/index.php?action=tpmod;dl=item1113
If this problem is now fixed, then we can mark this topic as solved. That way, if the only issue is adding another button to the Hobbit theme you can post a new topic in Fussilet's theme board for help on that.
FWIW, when editing php files, SMF seems to be very particular on how the files are saved so a program that saves the files correctly is imperative. I am not familiar with the Notepad2 you mentioned earlier but a lot of people use Notepad ++ (Is that the same program?) and there are others that are very good. I have like 4 or 5 different programs that let me work on php but the one I seem to use the most is Context.
ZarPrime
Edit: Sorry G6, I didn't see that you already responded here before I posted.
Quote from: IchBinâ„¢ on June 15, 2009, 02:52:06 PM
All you need to do is get rid of the single quote and commas and make your line look like this:
echo '<li', $current_action == 'forum' ? ' class="chosen"' : '', '><a href="', $scripturl, '?action=forum"><b>Forum</b></a></li>';
ok, I can see the problem now... One of the reasons I always hated the mixing of php and html ;)
Quote
In order to figure out why the language files are causing the problem, I would take them all out, and add one by one back in until you see the problem again.
yeah, gotta take a look at that, since with SMF MediaGallery Errors are back again when I set to german-utf8... (Funnily it's always with TPShout)
Quoteyeah, gotta take a look at that, since with SMF MediaGallery Errors are back again when I set to german-utf8... (Funnily it's always with TPShout)
Do you actually HAVE the TPShout.english
-utf8.php in your languages folder ?
Quote from: ZarPrime on June 15, 2009, 03:05:34 PM
The latest Language Packs that were uploaded the other day are in the download section ...
TP Beta4 German ISO Translation ...
http://www.tinyportal.net/index.php?action=tpmod;dl=item1112
TP Beta4 German UTF8 Translation ...
http://www.tinyportal.net/index.php?action=tpmod;dl=item1113
If this problem is now fixed, then we can mark this topic as solved. That way, if the only issue is adding another button to the Hobbit theme you can post a new topic in Fussilet's theme board for help on that.
very good, this solved it. I just copied the new files over and everything stayed like after my manual edits (so everythings ok). Still gotta solve that SMG problem, but I got no more TPShout errors with it.
Quote
FWIW, when editing php files, SMF seems to be very particular on how the files are saved so a program that saves the files correctly is imperative. I am not familiar with the Notepad2 you mentioned earlier but a lot of people use Notepad ++ (Is that the same program?) and there are others that are very good. I have like 4 or 5 different programs that let me work on php but the one I seem to use the most is Context.
I usually use vi, but for php files notepad2 has the better syntax highlighting (and Eclipse would be waaaay too much overhead :D)
And I already figured that part G6, but thanks for the hint. It indeed is a bit confusing how to activate blocks (even language specific)