• Resolved thakikka

    (@thakikka)


    Hello,

    I can’t chance the number of entries / page in the view settings. What ever value I set it stays with “10”.

    Thanks and regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report. I understand it to mean that you are using the “Screen Options” pull-down area on the Media/Assistant admin submenu to change the number of items displayed in the table, and that’s not working for you; is that right?

    I cannot reproduce this problem on my own system but I can give you a few things to try.

    You can try changing the value using an MLA setting:

    1. Navigate to the Settings/Media Library Assistant General tab.
    2. Scroll down to the “Table Defaults” portion of the “Media/Assistant Screen Options” ection.
    3. Change the value in the “Entries per page” text box (is it 10?).
    4. Scroll to the bottom of the screen and click “Save Changes” to record the new setting.

    Once that’s done, check the value in the text box to ensure that it reflects your update. If not, let me know. If it does, go back to the Media/Assistant screen and see if the new value is being used. Does it appear in the Screen Options pull down area? Can you now change the value there (don’t forget to click “Apply”)?

    If that doesn’t work, you can try going to the WordPress Settings/Reading screen and changing the “Blog pages show at most” setting. This is used by MLA as a default if the more specific option setting cannot be found. Does that work?

    You can also activate some MLA debug logging that would give me more information about the problem:

    1. Navigate to the Settings/Media Library Assistant Debug tab.
    2. Enter “1” in the “MLA Reporting” text box to activate MLA logging.
    3. Run a test, trying to change the “Entries per page” value in the Media/Assistant Screen Options area.
    4. Go back to the Debug tab and look for entries starting with “MLA::mla_set_screen_option_filter”.
    5. Copy the entries and post them here for my review.
    6. Delete the “MLA Reporting” value or set it to zero to turn logging off.

    I hope that will solve your problem or give me more information to investigate further. I will leave this topic unresolved until I hear back from you. Thanks for your interest in the plugin.

    Thread Starter thakikka

    (@thakikka)

    First of all, David, thanks for your great support for your great plugin.

    I understand it to mean that you are using the “Screen Options” pull-down area on the Media/Assistant admin submenu to change the number of items displayed in the table, and that’s not working for you; is that right?

    Yes, you are right. It’s always “10”. If I enter another value, after submitting it is “10” again.

    You can try changing the value using an MLA setting:
    […]
    Change the value in the “Entries per page” text box (is it 10?).

    The value in the MLA setting is “[+text+]”…?

    I tried to enter another value (“200”). I submitted and it works. But after I entered another value directly in the screen options, it was “10” again. And in the MLA setting there was that “[+text+]” value again.

    If that doesn’t work, you can try going to the WordPress Settings/Reading screen and changing the “Blog pages show at most” setting. This is used by MLA as a default if the more specific option setting cannot be found. Does that work?

    No, this didn’t work. I changed the value at “Blog pages show at most” to “200” but MLA still shows a maximum of 10 entries.

    You can also activate some MLA debug logging that would give me more information about the problem:

    I did this but there where NO text at all in the “Error Log” textarea after I changed the “Entries per page” value.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the kind words and for taking the time to run the tests I suggested and report your results.

    You should change your “Blog pages show at most” setting back to its original value or something sensible, e.g., 10. It is not involved in this problem.

    You wrote ‘The value in the MLA setting is “[+text+]”…?‘ I cannot explain this nor can I reproduce it on my system. Based on my inspection of the MLA code – it can’t happen. But I believe you, of course. You could try disabling, deleting and re-installing the plugin, but I think that’s very unlikely to help and is definitely a last resort.

    You wrote “I did this but there where NO text at all in the “Error Log” textarea…“. Do you see a valid path and filename just above the text area and in the “New PHP error_log” setting? If not, your site is not setup with an error log. You can try entering something like “/uploads/mla.log” in the “Debug File” text box and clicking “Save Changes”. Also, confirm that the “MLA Reporting” setting is one, i.e. the number one without any quotes. Even if you don’t run your test there should be entries in the log starting with “MLACore::mla_plugins_loaded_action()”.

    Are you running in a WordPress Multisite environment? Probably not, but there might some difference in behavior if you are.

    What WordPress Role does the current logged in user have, e.g., “Administrator”?

    Do you have access to a database tool like phpMyAdmin? If so, can you see what values are stored for the mla_entries_per_page entries in the usermeta table?

    I appreciate your help and your persistence; this is an unusual problem!

    Thread Starter thakikka

    (@thakikka)

    Do you have access to a database tool like phpMyAdmin? If so, can you see what values are stored for the mla_entries_per_page entries in the usermeta table?

    Yes. The meta_value is set to “NULL” if I try to set a value in the screen options. If I enter a value in the MLA-settings it works and shows up in the meta_value, too.

    You can try entering something like “/uploads/mla.log” in the “Debug File” text box and clicking “Save Changes”.

    Ah, yes, that worked:

    [04-Jun-2018 12:10:05] 600 MLACore::mla_plugins_loaded_action() MLA 2.73 () mla_debug_level 0x1
    [04-Jun-2018 12:10:18] 600 MLACore::mla_plugins_loaded_action() MLA 2.73 () mla_debug_level 0x1
    [04-Jun-2018 12:10:18] 635 MLASettings::mla_set_screen_option_filter( mla_entries_per_page ) status = false
    [04-Jun-2018 12:10:18] 636 MLASettings::mla_set_screen_option_filter( mla_entries_per_page ) value = ‘150’
    [04-Jun-2018 12:10:18] 698 MLA::mla_set_screen_option_filter( mla_entries_per_page ) status = false
    [04-Jun-2018 12:10:18] 699 MLA::mla_set_screen_option_filter( mla_entries_per_page ) value = ‘150’
    [04-Jun-2018 12:10:18] 702 MLA::mla_set_screen_option_filter $wp_filter[set-screen-option] priority = 10<br />filter name = ‘wpcf7_set_screen_options'<br />filter name = ‘000000000cf6e9b3000000002092c162save_bulk_edit_options'<br />filter name = ‘MLASettings::mla_set_screen_option_filter'<br />filter name = ‘MLA::mla_set_screen_option_filter'<br />
    [04-Jun-2018 12:10:18] 702 MLA::mla_set_screen_option_filter $wp_filter[set-screen-option] priority = 11<br />filter name = ‘000000000cf6ff3c000000002092c162options_screen_set'<br />
    [04-Jun-2018 12:10:19] 600 MLACore::mla_plugins_loaded_action() MLA 2.73 () mla_debug_level 0x1
    [04-Jun-2018 12:10:23] 600 MLACore::mla_plugins_loaded_action() MLA 2.73 () mla_debug_level 0x1

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the additional information from the database and the log file; very helpful.

    I manually set the entry in my own database to NULL and was able to reproduce your ‘The value in the MLA setting is “[+text+]”…?‘ behavior. I will update my own code to handle this more gracefully in the next MLA version.

    The log file contains a likely source of the problem:

    [04-Jun-2018 12:10:18] 702 MLA::mla_set_screen_option_filter $wp_filter[set-screen-option] priority = 10<br />filter name = ‘wpcf7_set_screen_options'<br />filter name = ‘000000000cf6e9b3000000002092c162save_bulk_edit_options'<br />filter name = ‘MLASettings::mla_set_screen_option_filter'<br />filter name = ‘MLA::mla_set_screen_option_filter'<br />
    [04-Jun-2018 12:10:18] 702 MLA::mla_set_screen_option_filter $wp_filter[set-screen-option] priority = 11<br />filter name = ‘000000000cf6ff3c000000002092c162options_screen_set'<br />
    

    These entries tell me that there are three plugins (or theme functions) that “hook” the filter used to set the Entries per page value:

    1. wpcf7_set_screen_options->save_bulk_edit_options() runs just before MLA’s filter.
    2. MLASettings::mla_set_screen_option_filter() is MLA’s filter.
    3. this->options_screen_set() runs after MLA’s filter (at priority 11). This is the likely cause of the problem.

    The first function probably comes from “Contact Form 7”. The source code for that function looks fine to me. I am not sure where the third function belongs without searching the source code of your site’s active plugins. If you can find and disable whatever plugin contains it the problem might disappear. If so, let me know the plugin’s name or post the source code of the options_screen_set() function and I will investigate further. You might start a topic in that plugin’s support forum to see if they can fix the problem.

    I will leave this topic unresolved until I hear back from you. In any case you now have a workaround that will let you adjust the Entries per page setting on an interim basis. Thanks for your help with this issue.

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since my last post in this topic. I hope you have found the source plugin or theme function that was preventing the “Entries per page” updates.

    I am marking this topic resolved since MLA is working properly and you have a way to adjust the Entries per page value on the General tab. Please update the topic if there is anything else I can do regarding the problem.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘mla_entries_per_page does not work’ is closed to new replies.