ryanramage / couchapp-takeout

DEPRECATED - a couchapp installer.
Apache License 2.0
22 stars 2 forks source link

Database names with punctuation #13

Open maf-jclark opened 12 years ago

maf-jclark commented 12 years ago

Hi, I'm using the Little Library app which includes couchapp-takeout and I'm having some difficulty with punctuation characters in the database name. I think my issue is related to couchapp-takeout (and perhaps even CouchDB) rather than the Little Library.

When I browse to a database called "the_little_library", which has The Little Library replicated directly into it, I have no trouble visiting the http://hostname:5984/the_little_library/_design/takeout/install.html.

But, when I visit the same page in another database called "the_littlelibrary(live-continuous)", none of the images show up and the configured name of the app is missing and the "Install App" button is missing.

I think the parentheses are causing an issue with the "variable replacement" part of couchapp-takeout and isn't getting takeoutInfo.appName (or any other variable).

Futon shows that a database can have any of the following characters:

only lowercase characters (a-z), digits (0-9), or any of the characters _, $, (, ), +, -, and / are allowed.

ryanramage commented 12 years ago

Thanks for reporting an issue. Let me see if I can help...

First understanding your issue. To restate: When you try using 'the little library' installed locally with couchapp-takeout some of the images don't show up? Are they application images, or are they document image?

Also, the default behavior of couchapp-takeout is to not show the 'Install App' button on a takeout replicated db (so it was easier for users to understand).

Another point, couchapp-takeout also does not immediately replicate the design doc called '_design/takeout', again by design. But there should be a doc called '_design/takeout-settings.jnlp'. Can you confirm that exists?

ryanramage commented 12 years ago

I see you are in chrome...can you do this for me please?

  1. Right Click on page, select 'Inspect Element'
  2. Select the 'Network' tab. Hit reload
  3. After the page shows, you will see a bunch of entries on the table in the network tab. Right click, Select 'copy all as HAR'

And paste and send me the results. It just lets me see how the page is requesting the resources.

ryanramage commented 12 years ago

Ok, I see the issue. It is the install.html page, on line 57

var match = /\/([a-zA-Z0-9_-]+)\//.exec(window.location);

The regex is not matching to the dbname.