News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Can't debug this error

Started by SirLouen, January 15, 2019, 04:28:57 AM

Previous topic - Next topic

SirLouen

When I access
/admin/?area=corefeatures
admin/?area=featuresettings
and
/admin/?area=securitysettings

I'm finding an error:

syntax error, unexpected ','

No file, no line. Just that.
I've accessed the Log
admin/?area=logs;sa=errorlog;desc

And nothing there
Neither on the apache2.log error file.

Any help to debug this issue?

I smell is somewhere in default theme GenericMenu.template.php but since there is no line or anything is like finding a needle in a haystack

Thanks!

Aleksi "Lex" Kilpinen

Well, to start with - that's not the url structure of a vanilla SMF. Should be /index.php?action=admin;area=corefeatures

What mods do you have installed?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SirLouen

I've been running the forum a long time (5+ years), but I'm not sure if this error has been there for long (maybe 6 months, maybe 1 year, or maybe started today)
The only recent action is that I've uninstalled the recaptcha mod to reinstall the 2.0 version of it. But as I say, I'm not sure if this change was the issue or not, since I've not accessed this sections for long. I had to access them because I wanted to reconfigure the recaptcha thing in the securty section. This is why I found this error.

I use pretty URL mod this is why yo u see the admin/area= thing instead of the vanilla version

I use a huge bunch of mods, it's probably this won't say anything to you:

reCAPTCHA for SMF
Disable 'last edit by...' for Administrators
Social Login
Gravatar 4 SMF
RSS Feed Poster
KeyCAPTCHA for SMF
Like Posts
Google Analytics Code
NoFollow BBCode
Ohara YouTube Embed
Enable TLS or STARTTLS in SMTP Mail for Google Apps by SmfSimple.com
Optimus
Simple .htaccess Cache Mod
Prevent Adding Signature Images And Links
Pretty URLs
SMF Post Prefix
Alternate User Posting
Quick Spoiler
Registered Links
Related Topics
Responsive Curve
Redirect Error 404
JW Player
SimplePortal
Disable Subject Change

What I cannot simply understand is why there is no "file/line" indicator
Feels difficult to debug it for me.

Illori

check your server error log, it may have the file name along with the line number.

Arantor

Odds are the file is Sources/ManageSettings.php.

Aleksi "Lex" Kilpinen

OK, not a whole lot - and not too many of those should touch the settings or generic controls I think, but still hard to guess what could be wrong.

You could try the hints in "Try to Output More Information" here https://wiki.simplemachines.org/smf/What_the_white_screen_of_death_means

Or you could try to manually check the code areas the reCaptcha mod changes for a start.
You can see the edits on the mod page https://custom.simplemachines.org/mods/index.php?mod=1044 through the manual install instructions on the right side of the page.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SirLouen

#6
Quote from: Illori on January 15, 2019, 05:14:00 AM
check your server error log, it may have the file name along with the line number.

I checked apache2 error log... nothing there as I said in the first message

Quote from: Aleksi "Lex" Kilpinen on January 15, 2019, 05:21:06 AM
OK, not a whole lot - and not too many of those should touch the settings or generic controls I think, but still hard to guess what could be wrong.

You could try the hints in "Try to Output More Information" here https://wiki.simplemachines.org/smf/What_the_white_screen_of_death_means

Or you could try to manually check the code areas the reCaptcha mod changes for a start.
You can see the edits on the mod page https://custom.simplemachines.org/mods/index.php?mod=1044 through the manual install instructions on the right side of the page.

Set
error_reporting(E_ALL);
ini_set('display_errors', 1);

Nothing extra in the error neither on the apache2 error log :(

BTW, I've tried uninstalling back the recaptcha mod and the same exact error persists without fails in the installation or aynthing like that
Also checked the mod snippets in the mods parse site and nothing special found. Everything is modified right.

Quote from: Arantor on January 15, 2019, 05:14:39 AM
Odds are the file is Sources/ManageSettings.php.

The problem is... where exactly. It's significantly big to find it just by reading the code :(

SirLouen

I'm thinking back and I remember that the last thing I uninstalled before this recaptcha 2.0 was the recaptcha 0.9.9

I'm checking the code in the parse options and I see weird things like this:

./Themes/default/css/index.css
Find (at the end of the file): [Select]
?>
Add Before: [Select]

/* Make the reCAPTCHA dialog centered to match the positioning of the built-in verification */
#recaptcha_area, #recaptcha_table
{
   margin-left: auto !important;
   margin-right: auto !important;
}

(Looking for a ?> in a css file?)

Anyway also found this:
in index.php?action=admin;area=securitysettings

8: Undefined index: description Filter: File: /default/GenericMenu.template.php
Line: 304

<p class="windowbg description">
  ', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], '
  </p>';

But the recaptcha mod does not modify this lines...

vbgamer45

Attach your Sources/ManageSettings.php we can scan it/compare to original as well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SirLouen

Quote from: vbgamer45 on January 15, 2019, 08:38:52 AM
Attach your Sources/ManageSettings.php we can scan it/compare to original as well.

Here we go


vbgamer45

Fixed file attached was from keycaptcha
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SirLouen

Quote from: vbgamer45 on January 15, 2019, 08:54:17 AM
Fixed file attached was from keycaptcha

Ok, it wasn't of Keycaptcha, it was my fault.
I remember that when I uninstalled the recaptcha 0.9.9 some time ago, I had to do a little mod in this file so the uninstall script could "accept" the mod, so probably I forgot to remove the whole block properly.

How did you detect it from like 2K lines of code?

vbgamer45

I loaded into a PHP IDE and it saw the error.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SirLouen

Quote from: vbgamer45 on January 15, 2019, 09:10:32 AM
I loaded into a PHP IDE and it saw the error.

And by the way, why do you think there was no more specificity in terms of debugging (line and file) for such a common error?

vbgamer45

That's how php is. The whole file couldn't execute well. Parts of SMF show up because of how files are included.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

SirLouen

Quote from: vbgamer45 on January 15, 2019, 12:09:21 PM
That's how php is. The whole file couldn't execute well. Parts of SMF show up because of how files are included.

At least for me it's a little awkward. I've been programming for wordpress for ages and never seen an syntax error without specificity.

Kindred

oh, wordpress can still screw up what file errors happen in...  depends on how the plugin integrates...
but, never-the-less, it's the way things work.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: