General Error - NO_STYLE_DATA

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
grish art
Registered User
Posts: 5
Joined: Thu Nov 14, 2013 10:05 am

General Error - NO_STYLE_DATA

Post by grish art » Thu Oct 10, 2019 12:58 pm

Hi I am having a problem with new users having the following error messages:

It only effects new users.

I have deleted the Cache folder production but it comes back and does not solve the problem. I am using pphbb 3.2.8

One error message.

General Error
No_STYLE_DATA

BACKTRACE

FILE: (NOT GIVEN BY PHP)
LINE: (NOT GIVEN BY PHP)
CALL: msg_handler()

FILE: [ROOT] /phpbb/user.php
LINE: 286
CALL: trigger_error()

FILE: [ROOT] /index.php
LINE: 29
CALL: phpbb/user->setup()

and another said:

General Error
No_STYLE_DATA


any help would be great

Thanks

What version of phpBB are you using? phpBB 3.2.8
What is your board's URL? http://www.emotionalfirstaid.co.uk/community/
Who do you host your board with? ukwebsolution
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Update from a previous version of phpBB
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? dont think so
What version of phpBB3 did you update from? I update every time a new version comes out
What MODs do you have installed? none
What styles do you currently have installed? Prosilver
What language(s) is your board currently using? English
Which database type/version are you using? not sure

When did your problem begin? As I say it is only effecting new users and the board has only had one new user since july and I have had no other reported problems.

Please describe your problem. as above
Screen Shot 2019-10-10 at 10.50.33.png
Screenshot_2019-10-10 General Error.png
Screenshot_2019-10-10 General Error.png (7.53 KiB) Viewed 840 times

User avatar
janus_zonstraal
Registered User
Posts: 3789
Joined: Sat Aug 30, 2014 1:30 pm

Re: General Error - NO_STYLE_DATA

Post by janus_zonstraal » Thu Oct 10, 2019 1:04 pm

How did you install your board? I used a tool provided by my host
Better use the files from here because we don't know what files your host is using.
So please replace al the file with the full packet phpbb3.2.8 files you can download here:
https://www.phpbb.com/downloads/

Delete all the files (except config.php !!! ) on the server and upload the new ones, with a good ftp program like filezilla.
Sorry! My English is bat ;) !!!

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Thu Oct 10, 2019 2:28 pm

grish art wrote:
Thu Oct 10, 2019 12:58 pm
Hi I am having a problem with new users having the following error messages:

It only effects new users.

...

General Error
No_STYLE_DATA
This error is generated completely in response to database information only. Meaning it's not a direct test of "does the style exist under the /styles/ folder" or similar. It's just a test of whether the user-selected style ID exists in the phpbb_styles table in the database; and potentially whether the board-defined default style ID exists in the the phpbb_styles table in the database.

Do you have more than one style installed and showing as active according to the phpBB ACP Customize tab? Or do you only have prosilver.

What are the three "Board Style" settings in ACP General, Board Settings currently set to? (Default Style, Guest Style and Override User Style.)

The behavior is as though this "new user" has a style ID selected which is no longer a valid style ID. But, the behavior also suggests that the board's currently configured Default Style is also not a valid style ID.

("Default Style" is what phpBB would have attempted to fall back to upon realizing that the user's selected style was no longer in the database. The user's previously-selected style ID potentially being invalid now is "expected" by phpBB, and it intends to default to the ACP "Default Style" in that case.)

You might need to go into ACP General, Board Settings and submit your desired settings for the "Board Style" section again, even if they already look correct. Because if there is actually an invalid style ID saved there currently, I don't think the ACP Board Style section will show you this condition exists. phpBB will simply display the currently-active styles in the drop-down list, and won't reveal that the style ID it wanted to select out of that list wasn't actually present.

So you are re-saving your ACP Board Settings selections "just in case" the style ID saved there is no longer a valid style ID. Which is what the NO_STYLE_DATA error is suggesting.


Edit: Your question made me realize I have this issue on my phpBB 3.2.8 board, too. 😜

The phpbb_config table had default_style set to 1 for some reason, which would have been the proSilver style ID. Except that prosilver isn't style ID 1 on my board. Indeed, I just had to visit the ACP Board Settings, ensure the "Default style:" selection was as intended, and hit "Submit" even if I didn't actually change anything. The phpbb_config table now has style ID 178, which is the correct style ID for my board.

Note that unless you have "Override user style: Yes" set in the board settings, you will also need to go fix the actual user's selected style from the user's "Preferences" section. You'll have to do this as administrator from the ACP Users and Groups tab, since the user cannot get into their User Control Panel to change the selection themselves. Same as ACP Board Settings, even if the selected style does not "look wrong" in their "Preferences", but you need to "Submit" that page anyway to ensure a valid style selection is written back to the database.

I'll have to go look through my backups to see when exactly this actually happened.

grish art
Registered User
Posts: 5
Joined: Thu Nov 14, 2013 10:05 am

Re: General Error - NO_STYLE_DATA

Post by grish art » Mon Oct 14, 2019 8:03 am

Thanks EA177.

It worked, I went into the styles and just clicked submit, I did not change any setting and its all working as it should now.

Thanks so much.
:-)

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Mon Oct 14, 2019 11:08 am

Great; glad this eliminated the issue for you too. In my case anyway, the prosilver style hasn't been style ID 1 at least as far back as our phpBB 3.0.14 board; and the subsequent upgrades have simply been keeping it that way.

But I'm still researching whom or what might have set the board configuration to the "style ID 1" value I found in the database now; apparently set without looking up what the style ID of prosilver actually is on the current board.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21724
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: General Error - NO_STYLE_DATA

Post by Mick » Mon Oct 14, 2019 12:56 pm

Probably something to do with the host install.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Mon Oct 14, 2019 4:58 pm

That's definitely one of the angles I'm following up on. I've investigated aspects of the Installatron installation behavior with them before; there wasn't any attempt to manipulate default_style in the code they showed me back then, but I've asked them to please check for any such reference now. Since Installatron invokes the phpBB-provided CLI installation interface, I've also been looking there. I wouldn't think I have any extensions that could be interested in or mistakenly doing this, but I need to look there as well.

OP's hosting provider UKWebSolution does use Installatron too, so it's definitely a reasonable suspicion and candidate for what needs to be investigated.

User avatar
3Di
Former Team Member
Posts: 14465
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: General Error - NO_STYLE_DATA

Post by 3Di » Mon Oct 14, 2019 7:03 pm

That will be not a problem with 3.2.9, the issue here is with newly registered users.
We are investigating a bit more in order to propose the related fix.

Edit: to add, we know auto installs have been always a prob right or wrong, that's another story though.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
✒️ Black Friday 2019 @ The Studio ▪️◾️

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Mon Oct 14, 2019 8:17 pm

3Di wrote:
Mon Oct 14, 2019 7:03 pm
That will be not a problem with 3.2.9, the issue here is with newly registered users.
We are investigating a bit more in order to propose the related fix.
Ostensibly whomever or whatever has set style ID 1 as default_style in my config table is the only bad actor here. We're not "missing logic or coherency within phpBB itself" in the same way as, say, your current https://tracker.phpbb.com/browse/PHPBB3-16144 changes are addressing. In that PHPBB3-16144 case, "a valid and selectable configuration in phpBB" could have landed us in a NO_STYLE_DATA scenario, and indeed we should prevent that.

I'm sure it would be appreciated and fine if we did add a check for "what if the default_style configuration suddenly became invalid, too." It's just not immediately clear for me anyway that "this is something phpBB ought to be doing." Unless we found out that the root cause of this current issue is also due to some phpBB-supported action like the PHPBB3-16144 case was, and we're cleaning up our own mess.

More can be said if and when the root cause is identified.

User avatar
3Di
Former Team Member
Posts: 14465
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: General Error - NO_STYLE_DATA

Post by 3Di » Mon Oct 14, 2019 8:27 pm

The user_add() function, which is responsible for the newly registered users does not check if the default style exists.
'user_style' => (int) $config['default_style'],
https://github.com/phpbb/phpbb/blob/60d ... r.php#L218
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
✒️ Black Friday 2019 @ The Studio ▪️◾️

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Tue Oct 15, 2019 9:27 pm

I stand corrected then. The fact that phpBB was already "prepared" to deal with the user style ID being invalid (by falling back to default_style) made me think PHPBB3-16144 was indeed closing a hole in phpBB's logic, because "the user style ID is now invalid" appeared to be a supported and expected condition for phpBB.

But with the code you're pointing to, I realize now I don't actually understand how the user style ID is ever "allowed" or "expected" to become invalid, either. So from that perspective, it's just as reasonable for us to build code to deal with "suddenly the default_style is an invalid style ID", same as it was apparently reasonable to already have code which dealt with "suddenly the user style ID is an invalid style ID."

User avatar
3Di
Former Team Member
Posts: 14465
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: General Error - NO_STYLE_DATA

Post by 3Di » Tue Oct 15, 2019 10:23 pm

Still I would like to know though HOW "suddenly the default_style is an invalid style ID", since the issue can lie elsewhere.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
✒️ Black Friday 2019 @ The Studio ▪️◾️

User avatar
EA117
Registered User
Posts: 1143
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: General Error - NO_STYLE_DATA

Post by EA117 » Mon Oct 21, 2019 12:07 am

3Di wrote:
Tue Oct 15, 2019 10:23 pm
Still I would like to know though HOW "suddenly the default_style is an invalid style ID", since the issue can lie elsewhere.
Installatron finally confirmed today that their script was what set default_style to a hard-coded 1 value. It's been fixed and will be querying the database for the correct style ID for prosilver now; and simply leaving default_style alone if prosilver is no longer installed. So this will be fixed at least by the time Installatron is offering phpBB 3.2.9 to any users; if not before then, depending on if your hosting provider already received Installatron updates.

I didn't press for the confirmation of why, and still presume it was an attempt to honor Step 5 from Knowledge Base - Updating 3.2.x, or from similar update instructions that have been presented in the past. The error was in assuming that prosilver would always exist, or always be ID 1 when it does exist.

Post Reply

Return to “[3.2.x] Support Forum”