Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world
perchance·Perchance - Create a Random Text GeneratorbyMidwestDude

Persistent 'undefined' errors ([title], [output], [goto.output]) even with working code copy

Hello Perchance Community,

I'm encountering a very persistent and unusual issue with my new generator, and I'm hoping someone can offer some insight. I'm trying to create a narrative using the goto-plugin, but I keep getting "undefined" errors for [title] and [output], even when I paste known working code.

Here's the situation:

  1. A known working goto-plugin example functions perfectly for me. (I can visit https://perchance.org/vc0cw4gi07 and it displays and navigates as expected, with no errors in my browser console.)

  2. When I copy this working code into a brand new, empty generator (https://perchance.org/kb2v71oinp), delete all default code and perform a clean paste of the entire content from https://perchance.org/vc0cw4gi07, it gives me errors:

    • An error has occurred somewhere in your code (in lists or HTML): The expression '[title]' returned nothing (undefined). You may be trying to reference a list, variable, or function that doesn't exist.
    • An error has occurred somewhere in your code (in lists or HTML): The expression '[output]' returned nothing (undefined). You may be trying to reference a list, variable, or function that doesn't exist.

I'm not adding or changing anything during the copy-paste process, so why does it not work?

Has anyone encountered this before, or does anyone have suggestions for how to debug this when the source code itself is known to be valid and functional elsewhere? Could this be related to browser caching, an account-specific issue, or something else I'm overlooking?

Any help or guidance would be greatly appreciated!

Thank you! MidwestDude

Persistent 'undefined' errors ([title], [output], [goto.output]) even with working code copyhttps://perchance.org/kb2v71oinpOpen linkView original on lemmy.world
1

2 replies

lemmy.world

Check your HTML part. <h1>[title]</h1> which is not defined anywhere, and update() which gives you [output] error. It's part of a new generator. You can completely clear that and start with a [darkroom].

2

You reached the end