zotero / zoterobib

ZoteroBib is a free online bibliography generator from the makers of Zotero
https://zbib.org
Other
70 stars 19 forks source link

Styles download fails if stylesURL is null in config #222

Closed dstillman closed 6 years ago

dstillman commented 6 years ago

I think this changed with the recent style-handling changes. It's now necessary to clear stylesURL in the config for the default URL to be used and style downloading not to fail with a request for /null.

tnajdek commented 6 years ago

@dstillman just to confirm you have stylesURL: null in config/local.json which is causing requests to go to the invalid url. If you remove this line, it will use the default url which should work fine. It will also produce few less bytes of code in index.html.

I'm not entirely sure why this is an issue? I could add extra checks to ensure that passing null in config falls back to the default url, but I'd say the correct solution here is to remove stylesURL override from your config/local.json? Unless I'm missing an use case here?

dstillman commented 6 years ago

Not a big deal. Just seemed like a regression from previous behavior, where the default config would still work. But I guess all the lines are commented out in the JSON anyway and you have to explicitly make a config, so we can ignore this.