While updating an in-event generator for the ongoing Generator Manager Event, A Venture Poem Generator, I have tried to add the url-params-plugin to add a feature so users could disable glows on the poem for performance reasons. But when testing out the generator after saving, it doesn’t work at all. Even when I test if that URL parameter exists at all, it still won’t show the expected output. Whatever parameter I put into the URL, when I run [url.anyurlname], it outputs undefined instead.

I’ve done the same with my view counter experiment generator, and had the same issue. (Try visiting https://perchance.org/the-view-counter-experiment?name=Example, the greeting text above the tabs thing should output Hello, Example!)

This is more likely a bug with the plugin that for some reason fails to cache those URL parameters into the generator. When I try setting the url value to [Object.fromEntries([...new URL(window.location.href).searchParams.entries()])] in place of importing the plugin in that generator, that worked. And since I use two different browsers, both didn’t work with the plugin imported.

  • @perchanceM
    link
    English
    1
    edit-2
    6 months ago

    Ah looks like it’s a simple mistake of url = {url-params-plugin} instead of url = {import:url-params-plugin} :) The former should probably be throwing an informative error though…

    • BluePowerOP
      link
      fedilink
      English
      16 months ago

      Yeah thanks for pointing out the issue, I definitely missed that one. I’ve corrected it on the second generator and it worked now.

      The former should probably be throwing an informative error though…

      It is interpreted as a valid, unevaluated string value so that’s probably why it didn’t throw any error. Maybe instead should create a warning for this import mistake so newbies can easily point it out (especially if they noticed something wrong with it) 🙂