MojoMojo n00b

3 messages Options
Embed this post
Permalink
Bernhard Graf-2

MojoMojo n00b

Reply Threaded More More options
Print post
Permalink
Hi all,

I installed MojoMojo today from the git repo and playing a little bit
with it. It looks really promising, but I have a few things that don't
work (yet?).

Sessions didn't work unless I installed the most recent
Catalyst::Plugin::Session::Store::File - i've had 0.15 (0.14?) before,
which created a new session directory for every request called somthing
like /tmp/mojomojo=hash(0x27f8648). Therfore 0.16 should be a
requirement, I think.

Path permissions seem to now work at all.
When I look in table path_permissions, I find most paths twice:
+---------+------+-------------------+----------------+----------------+--------------+--------------+--------------------+
| path    | role | apply_to_subpages | create_allowed | delete_allowed |
edit_allowed | view_allowed | attachment_allowed |
+---------+------+-------------------+----------------+----------------+--------------+--------------+--------------------+
| /       |    1 | no                | yes            | yes            |
yes          | yes          | yes                |
| /       |    1 | yes               | yes            | yes            |
yes          | yes          | yes                |
| /       |    3 | no                | yes            | yes            |
yes          | yes          | yes                |
| /intern |    1 | no                | yes            | yes            |
yes          | yes          | yes                |
| /intern |    1 | yes               | yes            | yes            |
yes          | yes          | yes                |
| /intern |    2 | no                | yes            | yes            |
yes          | yes          | yes                |
| /intern |    2 | yes               | yes            | yes            |
yes          | yes          | yes                |
| /intern |    3 | no                | no             | no             |
no           | no           | no                 |
| /intern |    3 | yes               | no             | no             |
no           | no           | no                 |
+---------+------+-------------------+----------------+----------------+--------------+--------------+--------------------+


Saving an edited page for the first time results in a Catalyst
"Please come back later" page. The internal error message is

[error] MojoMojo::Schema::Result::Page::content(): Column
content_version not loaded or not passed to new() prior to insert() on
MojoMojo::Model::DBIC::Page=HASH(0x64c1488) trying to resolve
relationship (maybe you forgot to call ->reload_from_storage to get
defaults from the
db) at
/home/graf/perl/mojomojo/script/../lib/MojoMojo/Controller/PageAdmin.pm
line 126

Actually a page with empty content is created.
When I press back and press "save" again, it works (= update).


My system:
- Linux (openSUSE, kernel 2.6.22)
- perl 5.10.0
- Catalyst 5.80002
- DBIx::Class 0.08100
- latest MojoMojo from repo
- database mysql (DBI 1.607, DBD::mysql 4.011)

If this is not the desired place for bug reports, then please guide me
to the correct location.

Bernhard Graf


_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Bernhard Graf-2

Re: MojoMojo n00b

Reply Threaded More More options
Print post
Permalink
On Mon, 27. April 2009, Bernhard Graf wrote:

> I installed MojoMojo today from the git repo and playing a little bit
> with it. It looks really promising, but I have a few things that
> don't work (yet?).

No answers? I wonder what this means...

- no ideas ?
- lack of interest ?
- I'm lying - there aren't any errors ?
- nobody else on this list ?

> Saving an edited page for the first time results in a Catalyst
> "Please come back later" page. The internal error message is
>
> [error] MojoMojo::Schema::Result::Page::content(): Column
> content_version not loaded or not passed to new() prior to insert()
> on MojoMojo::Model::DBIC::Page=HASH(0x64c1488) trying to resolve
> relationship (maybe you forgot to call ->reload_from_storage to get
> defaults from the
> db) at
> /home/graf/perl/mojomojo/script/../lib/MojoMojo/Controller/PageAdmin.
>pm line 126
>
> Actually a page with empty content is created.
> When I press back and press "save" again, it works (= update).
This seems to be related to the following:
http://n2.nabble.com/DBIx::Class-0.08100-released-to-CPAN-td2659408.html

This brought me on the right track, I think. Patch is attached.

BTW: Is there a reason, why MojoMojo doesn't use any DB transactions?
--
Bernhard Graf

[create-page.diff]

diff --git a/lib/MojoMojo/Schema/ResultSet/Page.pm b/lib/MojoMojo/Schema/ResultSet/Page.pm
index 29a2547..e929768 100644
--- a/lib/MojoMojo/Schema/ResultSet/Page.pm
+++ b/lib/MojoMojo/Schema/ResultSet/Page.pm
@@ -308,7 +308,7 @@ sub create_path_pages {
 
         # since SQLite doesn't support sequences, just cheat
         # for now and get the next id by creating a page record
-        my $page = $self->create( { parent => $parent->id } );
+        my $page = $self->create( { parent => $parent->id, content_version => undef } );
         my %version_data = map { $_ => $proto_page->{$_} } @version_columns;
 
         @version_data{qw/page version parent parent_version creator status release_date/} = (
@@ -382,4 +382,4 @@ sub open_gap {
     return $parent;
 }
 
-1;
\ No newline at end of file
+1;


_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Marcus Ramberg

Re: MojoMojo n00b

Reply Threaded More More options
Print post
Permalink

2009/4/29 Bernhard Graf <[hidden email]>
On Mon, 27. April 2009, Bernhard Graf wrote:

> I installed MojoMojo today from the git repo and playing a little bit
> with it. It looks really promising, but I have a few things that
> don't work (yet?).

No answers? I wonder what this means...

- no ideas ?
- lack of interest ?
- I'm lying - there aren't any errors ?
- nobody else on this list ?

Mostly it's

- Marcus sucks at mails :-/
 our development discussions happen on IRC in #mojomojo. We''l try to improve tho.

Sorry about that. The Session error is a known issue, we released the new session store after discovering it, and will be dependening on it in the next release of mojomojo. With regards to permissions, they do work, I use them in our work wiki. The permissions are supposed to be duplicate like that, one rule for the actual node, and one rule for it's children.
 

> Saving an edited page for the first time results in a Catalyst
> "Please come back later" page. The internal error message is
>
> [error] MojoMojo::Schema::Result::Page::content(): Column
> content_version not loaded or not passed to new() prior to insert()
> on MojoMojo::Model::DBIC::Page=HASH(0x64c1488) trying to resolve
> relationship (maybe you forgot to call ->reload_from_storage to get
> defaults from the
> db) at
> /home/graf/perl/mojomojo/script/../lib/MojoMojo/Controller/PageAdmin.
>pm line 126
>
> Actually a page with empty content is created.
> When I press back and press "save" again, it works (= update).

This seems to be related to the following:
http://n2.nabble.com/DBIx::Class-0.08100-released-to-CPAN-td2659408.html

This brought me on the right track, I think. Patch is attached.

Thanks. Patch applied to git repo 

BTW: Is there a reason, why MojoMojo doesn't use any DB transactions?

Not in particular. Patches would be welcome.

Marcus 

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo