• Resolved antonstepichev

    (@antonstepichev)


    Hello Davd!

    I seem to have found a bug in the multi-page term_list code.
    Open the test page https://www.backtomusic.ru/uc/term_list-test-page and select a category with a sufficient number of photos, for example “Praktiflex-v1”, then start leafing through the pages. Here’s what happens to the page address when I go through all six pages and starting to go back:

    1 - https://www.backtomusic.ru/uc/term_list-test-page
    2 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%C2%BBpraktiflex-1%C2%BB%22&mla_paginate_current=2
    3 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%5C%22%C2%BBpraktiflex-1%C2%BB%5C%22%22&mla_paginate_current=3
    4 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%5C%22%5C%5C%5C%22%C2%BBpraktiflex-1%C2%BB%5C%5C%5C%22%5C%22%22&mla_paginate_current=4
    5 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%5C%22%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%22%C2%BBpraktiflex-1%C2%BB%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%22%5C%22%22&mla_paginate_current=5
    6 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%5C%22%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%22%C2%BBpraktiflex-1%C2%BB%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%22%5C%22%22&mla_paginate_current=6
    5 - https://www.backtomusic.ru/uc/term_list-test-page?tax_input%5Battachment_category%5D=%22%5C%22%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%5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5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%5C%5C%5C%5C%22%5C%5C%5C%22%5C%22%22&mla_paginate_current=4

    the last address (take 8) no longer loads. The problem does not disappear if you turn off the photonic.

    The page I need help with: [log in to see the link]

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

    (@dglingren)

    Thanks for your report. I assume the source text of your shortcodes is the same as you posted in this earlier topic:

    Sorting items in Tag cloud by parent/child?

    Using the code in that topic I was able to reproduce your symptoms on my test system. I will investigate further and see if I can correct the problem. In the interim, however, you can avoid the problem by coding your last [mla_gallery] shortcode in a different way. Try something like this:

    [mla_gallery] style="random" 
    attachment_category="{+template:({+request:attachment_category+}|{+request:tax_input.attachment_category+}|a-bad-term)+}" 
    posts_per_page=2 mla_caption="{+title+} : {+description+}" 
    mla_nolink_text="<br> <br>"
    orderby="ID DESC"
    [/mla_gallery]
    
    [mla_gallery]
    attachment_category="{+template:({+request:attachment_category+}|{+request:tax_input.attachment_category+}|a-bad-term)+}"
    posts_per_page=12 mla_output="paginate_links,prev_next"
    mla_link_href='{+new_url+}?attachment_category="{+template:({+request:attachment_category+}|{+request:tax_input.attachment_category+}|a-bad-term)+}"'
    [/mla_gallery]
    

    In this version I have removed the mla_paginate_current={+new_page+} argument from the mla_link_href parameter. MLA generates this for you and you do not have to code it explicitly. I have also replaced your tax_input[attachment_category]="{+query:attachment_category,text+}" argument with attachment_category="{+template:({+request:tax_input.attachment_category+}|a-bad-term)+}". This seems to avoid the problem you have reported and lets you page through the gallery without errors. You must also replace the corresponding parameter in your other [mla_gallery] shortcode; attachment_category="{+template:({+request:attachment_category+}|{+request:tax_input.attachment_category+}|a-bad-term)+}".

    I am marking this topic resolved, but please update it if the above fix does not work for you. Thanks for alerting me to this MLA defect.

    Thread Starter antonstepichev

    (@antonstepichev)

    Yes, David, this topic resolved!
    Thank You very much and kind regards!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘bug in the multi-page term_list code’ is closed to new replies.