• Resolved A.T.

    (@annaryker)


    I’m trying the plugin but it doesn’t create valid urls. I’ve deactivated all the other plugins to check for compatibility issues, but this does not solve the problem.

    According to the documentation, when I put [random-url cat=”cat1″] it should output https://mydomain.com/random/?cat=cat1
    But it doesn’t, it outputs /random/?cat=cat1. It doesn’t put my domain in front.

    I can only get the full url by putting my domain in front manually like this: https://mydomain.com[random-url cat="cat1"]

    But this doesn’t work in the wysiwyg editor when I want to create a clickable link:
    When I enter https://mydomain.com[random-url cat="cat1"] as the link target, this is transformed to https://mydomain.com/random/?cat=%26quot%3Bcat1%26quot%3B&posttype=post&r=0
    This leads to a 404 page.

    When I use the html editor and type <a href="https://mydomain.com[random-url cat="cat1"]">link</a></p>, the link becomes this: https://mydomain.com[random-url cat="
    It’s cut off because the first quotation mark is seen as the end of the href.

    How can I fix this? I’ve disabled all other plugins, tried on a fresh install, but the problem persists.
    When I use [random-url] there are no problems, because there are no quotation marks I think. But I really need to be able to filter per category.

    • This topic was modified 2 years, 10 months ago by A.T..
    • This topic was modified 2 years, 10 months ago by A.T..
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Robert Peake

    (@robertpeake)

    Why do you need your domain in front? /random/?cat=cat1 should go to the exact same place when clicked…

    Thread Starter A.T.

    (@annaryker)

    Hey Thank you for your response. You are correct, but not putting the domain in front doesn’t change the issue with the quotation mark breaking the url (when using cat=)

    When I put the shortcode in the visual editor, the shortcode is transformed into a link, but the quotation marks are changed to =&quot; The link does not function because of this and goes to a ‘server not found page’.

    If I put the shortcode in via the html editor it is not transformed into an url and just becomes <a href="https=//[random-url cat="cat1"]"="">link</a>

    You can see my issue here:
    https://neyens.me/test-3/

    Any suggestions on this?

    Thank you!

    • This reply was modified 2 years, 10 months ago by A.T..
    • This reply was modified 2 years, 10 months ago by A.T..
    • This reply was modified 2 years, 10 months ago by A.T..
    Plugin Author Robert Peake

    (@robertpeake)

    The easiest workaround would be to not use the shortcode, just the link URL. It will still pick a random page from that category. HTH!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin doesn’t create valid urls when using cat=’ is closed to new replies.