apostrophecms / apostrophe-sandbox

This sandbox site is the basis for our live demo. For your own projects, you can use apostrophe-boilerplate as a more streamlined, cleaner point of departure via the apostrophe-cli tool.
MIT License
112 stars 41 forks source link

Homepage got a "Not Found" #1

Closed howellh closed 11 years ago

howellh commented 11 years ago

It's great to see the sandbox. thanks for made this happen. I got a "Not Found" on homepage when run node app.js
any hint on this?

Thanks.

boutell commented 11 years ago

Whoops, we forgot that there has to be a homepage for the site to work now that it's not a wiki anymore (:

I'll provide a convenience for this ASAP.

In the meantime:

mongo aposwiki db.aposPages.insert({ slug: '/', path: 'home' });

Ought to get you going.

On Tue, Feb 26, 2013 at 2:17 AM, codeinmind notifications@github.comwrote:

It's great to see the sandbox. thanks for made this happen. I got a "Not Found" on homepage when run node app.js

any hint on this?

Thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/1 .

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

boutell commented 11 years ago

I have documented these steps in the README for now.

boutell commented 11 years ago

I also forgot to give the home page a title (:

db.aposPages.update({ slug: '/' }, { $set: { title: 'Home' } });

On Tue, Feb 26, 2013 at 10:11 AM, Tom Boutell tom@punkave.com wrote:

Whoops, we forgot that there has to be a homepage for the site to work now that it's not a wiki anymore (:

I'll provide a convenience for this ASAP.

In the meantime:

mongo aposwiki db.aposPages.insert({ slug: '/', path: 'home' });

Ought to get you going.

On Tue, Feb 26, 2013 at 2:17 AM, codeinmind notifications@github.comwrote:

It's great to see the sandbox. thanks for made this happen. I got a "Not Found" on homepage when run node app.js

any hint on this?

Thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/1 .

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

boutell commented 11 years ago

Hoo boy... the homepage needs a level too:

db.aposPages.update({ slug: '/' }, { $set: { level: 0 }});

Otherwise your child pages have an undefined level which will make the page navigation links odd.

On Tue, Feb 26, 2013 at 1:00 PM, Tom Boutell tom@punkave.com wrote:

I also forgot to give the home page a title (:

db.aposPages.update({ slug: '/' }, { $set: { title: 'Home' } });

On Tue, Feb 26, 2013 at 10:11 AM, Tom Boutell tom@punkave.com wrote:

Whoops, we forgot that there has to be a homepage for the site to work now that it's not a wiki anymore (:

I'll provide a convenience for this ASAP.

In the meantime:

mongo aposwiki db.aposPages.insert({ slug: '/', path: 'home' });

Ought to get you going.

On Tue, Feb 26, 2013 at 2:17 AM, codeinmind notifications@github.comwrote:

It's great to see the sandbox. thanks for made this happen. I got a "Not Found" on homepage when run node app.js

any hint on this?

Thanks.

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/1 .

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

howellh commented 11 years ago

Thanks for the updates. homepage works! but "Edit Page" link seem doesn't work, new page couldn't be editable.

Thanks in advance for any hint.

boutell commented 11 years ago

Indeed it was not built yet git pull then npm update

Thanks for the updates. homepage works! but "Edit Page" link seem doesn't work, new page couldn't be editable.

Thanks in advance for any hint.

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/1#issuecomment-14153600 .

greelgorke commented 11 years ago

@boutell i have same problem: only not-found-page appears, no pages menu there. the db contains home, search and trash pages with title etc. but still no homepage is there.

boutell commented 11 years ago

Hi @greelgorke, I am not able to reproduce this problem. I git cloned and npm installed a fresh copy of the latest apostrophe-sandbox project. I then dropped my apostrophe-sandbox database to verify I got a not-found page. Then I ran 'reset-db.sh' per the instructions in the README. I was then able to see a home page and add a subpage without trouble.

If you continue to have trouble please send specifics. Thanks!

greelgorke commented 11 years ago

@boutell ok, i deleted the folder and does it from the very beginning, the issue is still there. the details:

os: mac os 10.7.5 node: 0.10.8 npm: 1.2.23 mongodb: 2.0.6

after the preparations (data/local.js, reset script) i start the app and call the homepage. log shows:

I see no data/port file, defaulting to port 3000
Listening on port 3000
Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-blog/public/css/main.css'
Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-events/public/css/main.css'
Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-events/public/js/widget.js'

in the db:

> db.aposPages.find()
{ "_id" : ObjectId("51a4a39c386c921bc6e8074e"), "0" : { "slug" : "/", "_id" : "4444444444444", "path" : "home", "title" : "Home", "level" : 0, "type" : "home" }, "1" : { "slug" : "/search", "_id" : "search", "orphan" : true, "path" : "home/search", "title" : "Search", "level" : 1, "type" : "search", "rank" : 9998 }, "2" : { "slug" : "/trash", "_id" : "trash", "path" : "home/trash", "title" : "Trash", "level" : 1, "trash" : true, "type" : "trash", "rank" : 9999 } }
> 

in browser, after login, there is no pages menu: fresh_home

boutell commented 11 years ago

Are you talking to MongoDB on localhost on the standard default port (27017)?

On Tue, May 28, 2013 at 8:41 AM, Gregor Elke notifications@github.comwrote:

ok, i deleted the folder and does it from the very beginning, the issue is still there. the details:

os: mac os 10.7.5 node: 0.10.8 npm: 1.2.23 mongodb: 2.0.6

after the preparations (data/local.js, reset script) i start the app and call the homepage. log shows:

I see no data/port file, defaulting to port 3000 Listening on port 3000 Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-blog/public/css/main.css' Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-events/public/css/main.css' Error: ENOENT, stat '/Users/gregor/projects/research/apostrophe-sandbox/node_modules/apostrophe-events/public/js/widget.js'

in the db:

db.aposPages.find() { "_id" : ObjectId("51a4a39c386c921bc6e8074e"), "0" : { "slug" : "/", "_id" : "4444444444444", "path" : "home", "title" : "Home", "level" : 0, "type" : "home" }, "1" : { "slug" : "/search", "_id" : "search", "orphan" : true, "path" : "home/search", "title" : "Search", "level" : 1, "type" : "search", "rank" : 9998 }, "2" : { "slug" : "/trash", "_id" : "trash", "path" : "home/trash", "title" : "Trash", "level" : 1, "trash" : true, "type" : "trash", "rank" : 9999 } }

in browser, after login, there is no pages menu: [image: fresh_home]https://f.cloud.github.com/assets/2396468/572235/c2b0f1c4-c793-11e2-93b3-bfee0ef03db8.png

— Reply to this email directly or view it on GitHubhttps://github.com/punkave/apostrophe-sandbox/issues/1#issuecomment-18547592 .

Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com

greelgorke commented 11 years ago

yes, havent change anything

boutell commented 11 years ago

That's very strange. I did the same thing with very different results. I almost wonder if you have two mongodb installs running, and the command line client is talking to the one, and the sandbox is talking to the other (localhost port 27017). Or maybe you have environment variables that cause the command line client to talk to a mongodb somewhere else? I wish I could poke at this myself.

Clearly this is a real issue for you, so I am keeping it open although I can't yet reproduce it here.

Will you be at jsconf by any chance?

greelgorke commented 11 years ago

well, i have only one mongod instance running. no chance for jsconf, sorry :)

i'll try to setup the project w/o sandbox later, just to see if it's a sandbox issue somehow, do you thin that make sense?

boutell commented 11 years ago

Aha: you do not have MongoDB 2.2 or better. MongoDB 2.2 or better is required to insert multiple documents in one call, which our reset script does.

Also we have released an update that removes the reset script in favor of a task:

node app.js apostrophe:reset

But that might face the same issue if you do not have 2.2. Just get newer Mongo and you'll be fine.