Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] | Named page still displays with default name #1096

Open
gabldotink opened this issue Feb 13, 2022 · 3 comments
Open

[BUG] | Named page still displays with default name #1096

gabldotink opened this issue Feb 13, 2022 · 3 comments

Comments

@gabldotink
Copy link

gabldotink commented Feb 13, 2022

Expected behavior

Show text string defined in "Name" on "/my/content" for my universes and other pages

Actual behavior

Shows correct name on actual page, but shows "New Universe", "New Character", etc. on dashboard and pretty much anywhere else that's not the actual page

Steps to reproduce the behavior

Running Notebook locally (127.0.0.1): Create a new page of any type, enter something into the "Name" field, then return to the dashboard. (works fine on the web version at notebook.ai)

Thank you for any and all help.

@gabldotink gabldotink changed the title (BUG) Named universe still appears as "New Universe" from dashboard (and other page types) on localhost Named universe still appears as "New Universe" from dashboard (and other page types) on localhost Feb 13, 2022
@gabldotink gabldotink changed the title Named universe still appears as "New Universe" from dashboard (and other page types) on localhost [BUG] | Named universe still appears as "New Universe" from dashboard (and other page types) on localhost Feb 13, 2022
@gabldotink gabldotink changed the title [BUG] | Named universe still appears as "New Universe" from dashboard (and other page types) on localhost [BUG] | Named page still displays with default name Feb 13, 2022
@drusepth
Copy link
Member

drusepth commented Feb 14, 2022

Hmm. Looks like the name should be caching from attribute to model in the name_update API endpoint, but that only fires if the associated field has a field_type of 'name'. Could you verify that the fields you're editing were created as name fields rather than plain text fields? You can do so by editing the templates and looking for a fingerprint icon next to the Name field instead of the text icon for other fields.

Example:
name

Or, if you're more comfortable with a local console, could you instead check to see if there are any name fields? I'd love to see the output to this on your local instance:

name_field_ids = AttributeField.where(field_type: 'name').pluck(:id)
puts name_field_ids

puts Attribute.where(attribute_field_id: name_field_ids).pluck(:value)

My guess is that the fields didn't initialize properly and therefore aren't hitting the right update endpoint (that would cache the updated name back onto the universe, character, etc).

@gabldotink
Copy link
Author

gabldotink commented Feb 14, 2022

The "Name" field does use a fingerprint icon, including in the category editor (not pictured). The name also correctly appears at the top of this character page, but only there.

notebook1

Meanwhile, on the dashboard and when attempting to link the character page, it appears only as "New Character".

notebook2
notebook3

(Sorry if you understood that already, just clarification.)

I'm assuming that you're talking about the browser inspect console. Using the command you listed yields Uncaught SyntaxError: missing ) after argument list, and as a console noob™, I can't see where the error is.

Something else that I did find in the console, however, is when I edit the "Name" field the following is printed as an error: POST http://127.0.0.1:3000/internal/name_field_update/98 500 (Internal Server Error). This probably confirms that it is a name field, but obviously, that's not the error. (This doesn't happen to me when performing the same action on notebook.ai, so that might be what's causing the problem.)

I tested this on Google Chrome and Firefox on Ubuntu, and the same things apply on both. (And yes, I tried turning it off and on again.)

@drusepth
Copy link
Member

Ah, thanks for the clarification! If they are indeed name fields (as it looks like they are), this may actually be a bug. I appreciate the detail; I'll do some digging and see what I can find out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants