Problem with updating attachment settings

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Problem with updating attachment settings

Post by Bruce Banner »

Just updated my attachment settings the way I wanted them, and the "configuration updated successfully", but the following line appeared three times at the top of the screen.

[phpBB Debug] PHP Warning: in file [ROOT]/includes/acp/acp_attachments.php on line 214: A non-numeric value encountered
Capture.PNG

User avatar
Lumpy Burgertushie
Registered User
Posts: 67395
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Problem with updating attachment settings

Post by Lumpy Burgertushie »

were you editing that file for some reason?

show us a screenshot of the settings that you set for the attachments.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

Lumpy Burgertushie wrote:
Wed Mar 25, 2020 3:02 pm
were you editing that file for some reason?
Nope.
show us a screenshot of the settings that you set for the attachments.


robert
Capture.PNG

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69720
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Problem with updating attachment settings

Post by KevC »

What happens if you put a zero (or any digit) in the boxes that are empty. I'm not sure you can have nothing in them.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

KevC wrote:
Wed Mar 25, 2020 3:26 pm
What happens if you put a zero (or any digit) in the boxes that are empty. I'm not sure you can have nothing in them.
That did the trick. Didn't get the error message that time. I had just assumed that if I deleted the valies that were in there by default, 0 would be automatically substituted. That's what used to happen with previous versions of phpBB. I'd just delete the default value, save the settings, and then when I'd check on them later on, 0 would have automatically been inserted in those boxes.

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

Not solved. It must be something else. Because I just retested the attachment settings by again deleting all the values and clicking Submit, and this time, there was no error message. So it must have been something else that caused the error message the first time.

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

Re: Problem with updating attachment settings

Post by EA117 »

I believe there are two parts to encountering the issue: Blank out the value instead of having a number entered or set by the spinner control, and have either "kilobytes" or "megabytes" selected as the value type. If you leave it with simply "bytes" selected, there isn't any math that needs to be performed against the value that is entered, and therefore no "but this is not a number" warning would occur.

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

Re: Problem with updating attachment settings

Post by 3Di »

Bruce Banner wrote:
Wed Mar 25, 2020 3:43 pm
Not solved. It must be something else. Because I just retested the attachment settings by again deleting all the values and clicking Submit, and this time, there was no error message. So it must have been something else that caused the error message the first time.
Just tested here, if you delete those 3 values leaving empty those fields and submit the form the values are set back to 0.

In the code nothing changed since 5 years ago and before it was 13 years ago.
https://github.com/phpbb/phpbb/blame/ma ... s.php#L555
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
:studio_microphone: Premium extensions @ The Studio

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

Re: Problem with updating attachment settings

Post by 3Di »

Oh, found the bug!
2020-03-26 00_38_16-Information.png
2020-03-26 00_38_16-Information.png (11.35 KiB) Viewed 234 times
Fixed locally, I will set up a PR. And done https://github.com/phpbb/phpbb/pull/5924
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
:studio_microphone: Premium extensions @ The Studio

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51203
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Problem with updating attachment settings

Post by stevemaury »

OP, here are the additions and deletions to try:

https://github.com/3D-I/phpbb/commit/5b ... 309bd8c4bf
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

EA117 wrote:
Wed Mar 25, 2020 10:37 pm
I believe there are two parts to encountering the issue: Blank out the value instead of having a number entered or set by the spinner control, and have either "kilobytes" or "megabytes" selected as the value type. If you leave it with simply "bytes" selected, there isn't any math that needs to be performed against the value that is entered, and therefore no "but this is not a number" warning would occur.
So you're saying the reason I got those error messages was because, as well as leaving the values blank, I had the value types set to MB and KB. If I'd had them set to Bytes, those messages wouldn't have appeared, right?
3Di wrote:
Wed Mar 25, 2020 11:31 pm
Bruce Banner wrote:
Wed Mar 25, 2020 3:43 pm
Not solved. It must be something else. Because I just retested the attachment settings by again deleting all the values and clicking Submit, and this time, there was no error message. So it must have been something else that caused the error message the first time.
Just tested here, if you delete those 3 values leaving empty those fields and submit the form the values are set back to 0.

In the code nothing changed since 5 years ago and before it was 13 years ago.
https://github.com/phpbb/phpbb/blame/ma ... s.php#L555
You clearly didn't read every previous post in the thread. If you had, you'd know that I was aleeady aware that leaving fields blank should automatically set them to 0. I had assumed that's what would happen this time but then I got those error messages.
3Di wrote:
Wed Mar 25, 2020 11:39 pm
Oh, found the bug!
2020-03-26 00_38_16-Information.png
Fixed locally, I will set up a PR. And done https://github.com/phpbb/phpbb/pull/5924
As you just did here.
stevemaury wrote:
Thu Mar 26, 2020 4:44 pm
OP, here are the additions and deletions to try:

https://github.com/3D-I/phpbb/commit/5b ... 309bd8c4bf
Thanks. I'll try them.

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

Re: Problem with updating attachment settings

Post by EA117 »

Bruce Banner wrote:
Thu Mar 26, 2020 5:16 pm
So you're saying the reason I got those error messages was because, as well as leaving the values blank, I had the value types set to MB and KB. If I'd had them set to Bytes, those messages wouldn't have appeared, right?
Correct. I was not seeing the issue either, even when blanking out the value. But after looking at the code, realized that no math would have been attempted with the entered values unless something other than "bytes" was selected.

stevemaury wrote:
Thu Mar 26, 2020 4:44 pm
OP, here are the additions and deletions to try:

https://github.com/3D-I/phpbb/commit/5b ... 309bd8c4bf
What that link literally shows are the differences between 3Di's v1 and v2 of the proposed fix, and not "the fix relative to the baseline found in the phpBB 3.3.0 release."

Potentially https://github.com/phpbb/phpbb/pull/5924/files gives a better view of what will be seen when looking for what change to add to an otherwise phpBB 3.3.0 acp_attachments.php, although the proposed fix is still receiving review feedback.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51203
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Problem with updating attachment settings

Post by stevemaury »

EA117 wrote:
Thu Mar 26, 2020 5:39 pm

stevemaury wrote:
Thu Mar 26, 2020 4:44 pm
OP, here are the additions and deletions to try:

https://github.com/3D-I/phpbb/commit/5b ... 309bd8c4bf
What that link literally shows are the differences between 3Di's v1 and v2 of the proposed fix, and not "the fix relative to the baseline found in the phpBB 3.3.0 release."

Potentially https://github.com/phpbb/phpbb/pull/5924/files gives a better view of what will be seen when looking for what change to add to an otherwise phpBB 3.3.0 acp_attachments.php, although the proposed fix is still receiving review feedback.
Yes, sorry. Misread what I was looking at.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

EA117 wrote:
Thu Mar 26, 2020 5:39 pm
What that link literally shows are the differences between 3Di's v1 and v2 of the proposed fix, and not "the fix relative to the baseline found in the phpBB 3.3.0 release."

Potentially https://github.com/phpbb/phpbb/pull/5924/files gives a better view of what will be seen when looking for what change to add to an otherwise phpBB 3.3.0 acp_attachments.php, although the proposed fix is still receiving review feedback.
stevemaury wrote:
Thu Mar 26, 2020 5:50 pm
EA117 wrote:
Thu Mar 26, 2020 5:39 pm

stevemaury wrote:
Thu Mar 26, 2020 4:44 pm
Yes, sorry. Misread what I was looking at.
Yeah, just tried making those deletions but couldn't find the first line of code I was supposed to delete.

Bruce Banner
Registered User
Posts: 699
Joined: Thu Sep 25, 2014 10:36 am

Re: Problem with updating attachment settings

Post by Bruce Banner »

Sorry, messed up that last post. Put what I said inside one of the quotes. Meant to say

"Yeah, just tried making those deletions but couldn't find the first line of code I was supposed to delete."

Post Reply

Return to “[3.3.x] Support Forum”