# 0.6.0 -\> 0.6.9 migration problems

**URL:** <https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270>\
**Category:** Radiant CMS\
**Created:** [August 19, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270 "2008-08-19T17:40:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/1 "2008-08-19T17:40:07Z")

</div>

Folks,

First, thanks for 0.6.9, which looks good. But we’re finding two errors:

1. r:find doesn’t work
2. Any change to any page returns:

“Page has been modified since it was last loaded. Changes cannot be  
saved without potentially losing data.”

I can’t find any stacktraces or errors in our logs.

I ran the upgrade instructions as documented, i.e., “sudo rake  
radiant:update” and “sudo rake production db:migrate” and neither  
returned any errors. The db migration echoed the changes it made to  
the schema w/out any errors. This is with Postgresql 8.2.3.

Any help would be greatly appreciated.

Cheers,  
Kendall Clark

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/2 "2008-08-19T18:06:01Z")

</div>

Kendall,

Around 0.6.2 or so, we added optimistic locking to all content models  
(page, snippet, layout) to prevent multiple users from overwriting each  
other’s changes unknowingly. Make sure no one is logged into the admin  
interface, and then do this in the console:

[Page, Snippet, Layout].each do |model|  
model.update\_all(:lock\_version =\> 1)  
end

See if that clears things up. Can you provide an example of where  
\<r:find\> doesn’t work?

Sean

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/3 "2008-08-19T18:11:19Z")

</div>

On Tue, Aug 19, 2008 at 12:05 PM, Sean C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> See if that clears things up. \>

Sure, but I’m a bit confused: what’s the console?

Can you provide an example of where \<r:find\> doesn’t work?

Sure, see [http://clarkparsia.com/](http://clarkparsia.com/) or [http://pellet.owldl.com/](http://pellet.owldl.com/) – the  
topnav of both sites looks like this:

…

 \<li id="nav-3" class="selected" \> " title="Our Projects" accesskey="s"\>_S_oftware & Services \<li id="nav-4" class="selected" \> " title="Our Papers" accesskey="p"\>_P_apers

> From the / page, these all work fine…But from any child page of /,  
> like /pages, the other links don’t work at all. You can see it live on  
> either site.

Cheers,  
Kendall

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/4 "2008-08-19T18:22:28Z")

</div>

Open a terminal or SSH to your instance of Radiant, and the run  
‘script/console’ from the prompt to get the “console”.

In those cases you gave, you probably need to provide a complete URL to  
the page you want to select, like so:

\<r:find url="/projects"\>…

However, in the case you have shown, it would make more sense to just  
put ‘/projects’ and ‘/papers’ directly in the href attribute.

Sean

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/5 "2008-08-19T18:33:03Z")

</div>

On Tue, Aug 19, 2008 at 12:05 PM, Sean C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Kendall,
> 
> Around 0.6.2 or so, we added optimistic locking to all content models (page,  
> snippet, layout) to prevent multiple users from overwriting each other’s  
> changes unknowingly. Make sure no one is logged into the admin interface,  
> and then do this in the console:

Is there any way to force logouts from either the console or  
command-line? The other problem we just discovered is that the logout  
from admin interface doesn’t seem to work. The redirect fails and  
we’re still logged in.

Cheers,  
Kendall

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/6 "2008-08-19T18:43:02Z")

</div>

There’s no way to force logouts unless you’re still using the  
:active\_record\_store or :pstore for sessions. If the former, run rake  
db:sessions:clear from the command line. If the latter, remove  
everything in the tmp/sessions directory.

Sean

---

<div class="post-metadata">

**Author:** ![Kendall\_Clark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/d07c76/32.png) [@Kendall\_Clark](https://www.ruby-forum.com/u/Kendall_Clark)\
**Post date:** [August 19, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/0-6-0-0-6-9-migration-problems/146270/7 "2008-08-19T18:59:28Z")

</div>

On Tue, Aug 19, 2008 at 12:42 PM, Sean C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> There’s no way to force logouts unless you’re still using the  
> :active\_record\_store or :pstore for sessions. If the former, run rake  
> db:sessions:clear from the command line. If the latter, remove everything  
> in the tmp/sessions directory.

Thanks, Sean. We seem to have sorted everything out.

One question: Maybe since we built our sites, around 0.5 version,  
there’s some kind of alias feature added so that we can refer to pages  
via slug or name, etc, rather than via URL in r:find since, as you  
point out, that’s just more typing than making links by hardcoding  
URLs.

Cheers,  
Kendall
