I did try this by restricting the number of fields on a screen to less than 5 and that did not help me. I do not think it is the number of records/fields. I think it is a JavaScript issue that the old standard in Safari does not have a problem with. Perhaps one of those things that doesn't throw an error in the console.MarkDHamill wrote:Worth a try. The SQL I showed is an example of what might appear. The exact SQL will be different depending on the search pattern in the username field.
If it works on one browser but not another, that's a good sign it's a browser issue. I have to assume it's related to the hundreds of fields that can be on the screen, most of them hidden.
Edit Subscribers Stopped Working - Digests
Re: Edit Subscribers Stopped Working
-
- Registered User
- Posts: 20
- Joined: Thu May 22, 2008 12:09 am
- Contact:
Re: Edit Subscribers Stopped Working
Tropheus99 set up a test forum for me to use. When entering something in the search field for edit subscribers and pressing return, nothing seems to happen. Pressing the submit button renders results, but it ignores the search field. This does not happen in my development environment or on my test forum. I'm wondering if this is due to an old version of digests being used. What version are you using? It may be a bug that was closed long ago.
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
Just to confirm the latest version of Digests is installed on the test forum I sent you.
-
- Registered User
- Posts: 29
- Joined: Sat Dec 01, 2018 8:32 pm
- Contact:
Re: Edit Subscribers Stopped Working
The form is so dense with fields that submitting it will often trigger a max_input_vars error. To deal with this, on form submission I disable all input fields except those that were changed. Those that were changed should be added to an array called inStack, executed by an onchange() event attached to every input field. Here's the code:
Code: Select all
// If a field was not changed, disable it so it won't be sent to the web server. This helps get around PHP's
// max_input_var resource limitation on the Edit subscribers screen.
$('#acp_digests').submit(function() {
if ($('#digests').length === 1) {
// Logic only applies on edit subscribers screen because stack won't exist otherwise. #digests is an
// ID only on the edit subscribers screen.
$('input, select').each(function() {
if (!inStack($(this).attr('name'))) {
$(this).prop('disabled', true);
}
});
}
});
The function is probably not getting executed because a Javascript error occurs, as documented, errors like:
So figuring out a solution to this should solve the general issue. I've done some searching on the web, and setting the form to novalidate didn't work. I encourage people to look at some of the things people have tried and see if any of them work to keep the error from happening:An invalid form control with name='user-4634-max_display_words' is not focusable.
https://duckduckgo.com/?q=invalid+form+ ... +focusable
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
Thanks. Let's try this on the test forum you set up for me:Tropheus99 wrote:Hi Mark,
Just to confirm the latest version of Digests is installed on the test forum I sent you.
Before line 84 of
/ext/phpbbservices/digests/adm/style/acp_digests.js
(this assumes you are using version 3.2.15, the latest), which is:Code: Select all
$(this).prop('disabled', true);
Code: Select all
$(this).prop('required', false);
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
That seems to work! Take a look for yourself to make sure.
Thanks,
Ken.
-
- Registered User
- Posts: 29
- Joined: Sat Dec 01, 2018 8:32 pm
- Contact:
Re: Edit Subscribers Stopped Working
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
-
- Registered User
- Posts: 29
- Joined: Sat Dec 01, 2018 8:32 pm
- Contact:
Re: Edit Subscribers Stopped Working
-
- Registered User
- Posts: 7
- Joined: Tue Jul 23, 2019 9:54 am
- Contact:
Re: Edit Subscribers Stopped Working
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
I had to add novalidate before the JQuery fix would work for me, otherwise it still just ignores my enter. Without, it returns:MarkDHamill wrote:Great. I don't think the novalidate does the trick though, but the jQuery addition.
An invalid form control with name='user-<various>-max_display_words' is not focusable.
I'll double check to make sure the fix is actually being applied properly on my system.
-
- Registered User
- Posts: 7
- Joined: Tue Jul 23, 2019 9:54 am
- Contact:
Re: Edit Subscribers Stopped Working
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
/ext/phpbbservices/digests/adm/style/acp_digests.html
from:Code: Select all
<form id="acp_digests" method="post" action="{{ U_ACTION }}">
Code: Select all
<form id="acp_digests" method="post" action="{{ U_ACTION }}" {% if S_EDIT_SUBSCRIBERS %}novalidate{% endif %}>
- MarkDHamill
- Registered User
- Posts: 4885
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
- Contact:
Re: Edit Subscribers Stopped Working
Great, works perfectly. I had to purge the cache before it appeared, and with the JQuery mod too this feature works again!MarkDHamill wrote:The best way to change the template to add the novalidate flag is to change line 99 of/ext/phpbbservices/digests/adm/style/acp_digests.html
from:
to:Code: Select all
<form id="acp_digests" method="post" action="{{ U_ACTION }}">
Code: Select all
<form id="acp_digests" method="post" action="{{ U_ACTION }}" {% if S_EDIT_SUBSCRIBERS %}novalidate{% endif %}>
-
- Registered User
- Posts: 7
- Joined: Tue Jul 23, 2019 9:54 am
- Contact: