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

Strange 'undefined' in "Edit" link #378

Open
Gaibhne opened this issue Sep 14, 2022 · 5 comments
Open

Strange 'undefined' in "Edit" link #378

Gaibhne opened this issue Sep 14, 2022 · 5 comments
Labels
more-information-needed Please Provide More Details

Comments

@Gaibhne
Copy link

Gaibhne commented Sep 14, 2022

When I click on the edit checkbox, I am forwarded to a (naturally not working) link that looks like this:

https://my.domain.comundefined/SomeFolder/SomeArticle/edit

The slashes are pasted above as they are, the undefined attaches directly to the .com of the domain.

In my config, I have both parameter that seem relevant set:

  base_url: 'https://my.domain.com',
  path_prefix: '',

Normal browsing my my articles works perfectly fine, both the main category as well as subcategories.

@Vorsku
Copy link

Vorsku commented Oct 10, 2022

I had this exact symptom but the fix for me was that I was missing the path_prefix in my config, even though I don't use a path, so I just had to add path_prefix: '',

I also have nowrap: true, which you don't seem to have? Might be worth a try.

The only other thing I can say is that 'undefined' just seems to be a missing variable in the config file, so check it against the default config file in the repo and see if you're missing any in yours.

@anantone
Copy link

Same problem here. Any luck solving it?

@ryanlelek
Copy link
Owner

Thanks for reporting.

If you've upgraded the Raneto package recently, there might have been a config change.
It depends how long you've been using Raneto, as earlier versions may have issues.

Try comparing your config and files to this example repo
https://github.com/raneto/example
Here's the config file in particular
https://github.com/raneto/example/blob/master/config/config.js

If you are comfortable sharing your config, I can look at it and help

And I'd also suggest moving your content to the new file structure.
It's a much simpler and hides most of the Raneto inner workings so you can focus on your content
This wont work well if you made custom edits to the theme. IF you're using the default it should work fine

New structure

  • Clone https://github.com/raneto/example/ or otherwise structure your files similarly
  • Merge your existing config with the new config file in config/config.js
  • Move your content file to content/ directory

@ryanlelek ryanlelek added the more-information-needed Please Provide More Details label Oct 26, 2022
@anantone
Copy link

Hi @ryanlelek, thanks for following up. I installed Raneto yesterday using image linuxserver/raneto:0.17.2 with CapRover one-click install (on an Ubuntu VPS). Config file is default, I just added a site title and contact email from fresh install.

What happens is: if I add anything as "base_url", I get an error "Cannot GET /" at startup. If I leave "base_url" blank, everything works fine except when wanting to edit a file, "undefined" gets added to the link as described above. Manually removing it loads the edit page properly, so it's really a matter of the url.

Hopefully, you can shed some light on why this happens. Thanks again.

@Gaibhne
Copy link
Author

Gaibhne commented Nov 3, 2022

I can confirm that I also experienced exactly what @anantone described, but unfortunately, I no longer have my config file, as I moved on to another personal Wiki due to the (possibly only perceived) inability to have a category hierarchy. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Please Provide More Details
Projects
None yet
Development

No branches or pull requests

4 participants