• Resolved Dieter_H

    (@dieter_h)


    Hi David,
    I am not sure what I am doing wrong. I installed Media Library Assistant along with Real Media Library. They have been working together great for 5 years.
    Now I wanted to generate an overview page with random images.
    I use the shortcode [mla_gallery mla_rml_folder = “9” mla_rml_include_children = “true” orderby = “rand”]. The folder contents are also presented nicely. Unfortunately, it doesn’t matter whether I set name, date or rand as the orderby value, the output is always in the same order.
    I can’t figure out where the problem is. Can you help?
    Greetings Dieter`

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

    (@dglingren)

    Thanks for the question and for including the source text of your shortcode; very helpful.

    I have just finished a quick test on my system and these three shortcodes are working as expected:

    [mla_gallery mla_rml_folder=1 mla_rml_include_children=true orderby=rand]
    <hr>
    [mla_gallery mla_rml_folder=1 mla_rml_include_children=true orderby=date]
    <hr>
    [mla_gallery mla_rml_folder=1 mla_rml_include_children=true orderby=title]
    

    Comparing my shortcodes to yours might indicate the problem. In particular, my shortcodes have no spaces between the parameter name and value; WordPress uses spaces to separate one parameter from the next and would recognize orderby = “rand” as three separate parameters. Also, the quote marks are not required, since the parameter values contain no spaces within them.

    I hope that gets you the results you need. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

    Thread Starter Dieter_H

    (@dieter_h)

    Hi David,
    Thanks for your quick answer and the test. Unfortunately, it’s not that easy. I don’t know where the spaces are coming from (maybe because I didn’t use the code-tags), they weren’t in my shortcode. I have now deactivated all plugins except Real Media Library and Media Assistant. The problem is still there. It only occurs when I do the RML-folder link. Pure MLA shortcodes such as [mla_gallery attachment_category=mitglieder orderby=rand] sort the output correctly.
    Sorry for that, but do you have any other ideas?
    Greetings Dieter

    Thread Starter Dieter_H

    (@dieter_h)

    Maybe it helps during testing if I describe the folder structure:
    There is the folder ID=9, without pictures and under it 2 sub-folders (ID10, ID189) with 10-15 pictures each. The selection works, only the sorting is always identical in the output. Independent of the rand, name, title value of the orderby parameter.
    Greetings Dieter

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your updates with the additional information. My further testing reproduced your issue with the RML “Pro” version, which handles the orderby= parameter in a different way than the free/lite version.

    I have uploaded a new MLA Development Version dated 20220110 that contains a fix for your issue. You can find step-by-step instructions for using the Development Version in this earlier topic:

    PHP Warning on media upload with Polylang

    Once the Development Version is installed you can rerun your random sorting gallery.
    The updated code will be part of my next MLA version, but in the interim it would be great if you could install the Development Version and let me know if it works for you. Thanks for uncovering and reporting this MLA defect.

    Thread Starter Dieter_H

    (@dieter_h)

    Thanks for your work and the gigantic plugin that you built.
    I will install the development version and report on it.

    Thread Starter Dieter_H

    (@dieter_h)

    Run’s great – like expected

    Plugin Author David Lingren

    (@dglingren)

    Thanks for taking the time to test the fix; much appreciated. Thanks as well for the kind words regarding the plugin. If there’s anything else I can do to help you get the most out of MLA, start a new topic and let me know.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘order and orderby paramter not working with Real Media Library ?’ is closed to new replies.