Refinery does not route to home page for root

2,570 views
Skip to first unread message

vertigon451

unread,
Nov 25, 2011, 12:52:39 PM11/25/11
to Refinery CMS
When I visit 0.0.0.0:3000, my refinery-based website used to go to the
"Home" page, but it doesn't any more. Now it shows a message that "The
page you were looking for doesn't exist."

This started happening after I accidentally called rake db:reset on my
local database and had to re-enter all the page content by hand. Once
I set up the pages in refinery again, the pages work fine if I specify
them directly by url. (i.e. 0.0.0.0:3000/home or 0.0.0.0:3000/about),
but 0.0.0.0:3000 doesn't route to 0.0.0.0:3000/home any more, which is
the desired behavior.

Any ideas?

Here's what show's up in the terminal:


Started GET "/" for 127.0.0.1 at 2011-11-25 12:30:31 -0500
Processing by PagesController#home as HTML
Parameters: {"locale"=>:en}
SQL (1.0ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'

SQL (0.4ms) SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
Page::Translation Load (0.2ms) SELECT page_id AS id FROM
"page_translations" WHERE "page_translations"."locale" = 'en'
Role Load (0.2ms) SELECT "roles".* FROM "roles" WHERE
"roles"."title" = 'Refinery' LIMIT 1
User Load (1.0ms) SELECT * FROM "users" INNER JOIN "roles_users" ON
"users".id = "roles_users".user_id WHERE ("roles_users".role_id = 1 )
Page Load (0.2ms) SELECT "pages".* FROM "pages" WHERE
"pages"."link_url" = '/' LIMIT 1
Page Load (0.1ms) SELECT "pages".* FROM "pages" WHERE
"pages"."menu_match" = '^/404$' LIMIT 1
Rendered public/404.html (0.4ms)
User Load (60.3ms) SELECT "users".* FROM "users" WHERE "users"."id"
= 1 LIMIT 1
Role Load (0.2ms) SELECT * FROM "roles" INNER JOIN "roles_users" ON
"roles".id = "roles_users".role_id WHERE ("roles_users".user_id = 1 )
Completed 404 Not Found in 365ms (Views: 12.7ms | ActiveRecord: 3.0ms)

Thanks,
Jeremy

Philip Arndt

unread,
Nov 25, 2011, 2:37:18 PM11/25/11
to refine...@googlegroups.com
You need the homepage to "forward this page" to / under advanced options

vertigon451

unread,
Dec 1, 2011, 9:10:01 PM12/1/11
to Refinery CMS
Philip,

Do you mean set the "forward this page" setting on my "Home" page?
That wouldn't produce the effect I am looking for. I don't want to
forward traffic from 0.0.0.0:3000/home to 0.0.0.0:3000. I want to do
the opposite. I need Refinery to forward users from the root of my
site 0.0.0.0:3000 to 0.0.0.0:3000/home. So that when users go to my
site, they automatically go to the "Home" page that I have created.

It seems like it's some setting in the guts of refinery, perhaps in
the database, that I need to fix. Any ideas?

Jeremy

Philip Arndt

unread,
Dec 1, 2011, 9:10:57 PM12/1/11
to refine...@googlegroups.com
Try what I suggested :-)

Jeremy Jarvis

unread,
Dec 2, 2011, 6:08:00 PM12/2/11
to refine...@googlegroups.com
Thanks Philip.  It worked.  I don't understand how it worked, but it did.  Please someone explain how this makes sense, because my brain is going to melt. :)

Is this a predefined rule in Refinery, that if the Forward This Page option is set to "/" that Refinery knows to set that page to the home page?  Or is there a railsy explanation for this behavior?

Thanks,
Jeremy

On Thu, Dec 1, 2011 at 9:10 PM, Philip Arndt <par...@gmail.com> wrote:
Try what I suggested :-)

--
You received this message because you are subscribed to the Google
Groups "Refinery CMS" group.
To post to this group, send email to refine...@googlegroups.com
To unsubscribe from this group, send email to
refinery-cms...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/refinery-cms?hl=en

http://www.refinerycms.com

Philip Arndt

unread,
Dec 2, 2011, 6:09:21 PM12/2/11
to refine...@googlegroups.com
Refinery pages extension is looking for a page with the url '/' to be the home page. So by telling the page titled "Home" that you want it to have the url '/' you're setting it as the definitive homepage as far as Refinery pages extension is concerned.

Jeremy Jarvis

unread,
Dec 2, 2011, 7:06:35 PM12/2/11
to refine...@googlegroups.com
I see.  That makes sense.  Thanks for your help. :)

Jeremy

On Fri, Dec 2, 2011 at 6:09 PM, Philip Arndt <par...@gmail.com> wrote:
Refinery pages extension is looking for a page with the url '/' to be the home page. So by telling the page titled "Home" that you want it to have the url '/' you're setting it as the definitive homepage as far as Refinery pages extension is concerned.

--
Reply all
Reply to author
Forward
0 new messages