Can't add page part with Shards installed?

Hi, guys.

I am currently trying out Radiant, and I have the intention of writing
an admin extension to it. It seems to me that this is easier/better
using the Shards extension, so I used Piston to import shards (from
the trunk, revision 571, which seems to be the latest) to
vendor/extensions/shards.

I also have Radiant imported from the trunk (revision 575), using
Piston, to vendor/radiant.

I am not using any other extensions, and even so I made sure, on
environment.rb, that shards was loaded before anything else.

Now, when I try to add a page part to a page, what happens is the
following:

  1. I click on the green plus sign on the far right
  2. The little window pops up, and I write the name of my page part
  3. FireBug reports an error (the console output is here:
    Parked at Loopia)
  4. Radiant goes to /admin/ui/pages/part/add, where it renders
    “admin/page/_part”, with no layout. The log can be seen here:
    Parked at Loopia
  5. Upon going back to the admin interface, no page parts were added.

Does anyone have a clue on why this is happening?

Thanks,
Marcelo A…

Marcelo A. wrote:

Parked at Loopia
5) Upon going back to the admin interface, no page parts were added.

Does anyone have a clue on why this is happening?

Thanks,
Marcelo A…

Hi Marcelo

I had the exact same problem without Shards on Rev 573. It seemed to be
fixed in Rev 575 of Radiant. Can you verify that it works fine without
Shards?

Also, are you using copy_move extension? The archive previously on the
site (if you didn’t get it by darcs) was a bit outdated and may have
had something to do with it.

Cheers,
Mohit.
11/7/2007 | 3:20 PM.

Marcelo A. wrote:

Parked at Loopia
5) Upon going back to the admin interface, no page parts were added.

Does anyone have a clue on why this is happening?

Thanks,
Marcelo A…

Sorry, I just noticed that you say that you are not using any other
extensions. Can you confirm that it works fine without Shards?

Cheers,
Mohit.
11/7/2007 | 3:21 PM.

Sorry for the issues. I updated the core yesterday with Mislav’s JS
patch but did not get Shards updated. I will do so today.

Sean

Hi!

Thanks for your quick response. I did some “researching” here, and
just found out that with my setup (Radiant gem 0.6.3, Ruby 1.8.6 on a
Windows XP machine), if I do a regular “radiant site”, then “rake
radiant:freeze:edge” (goes to revision 580), I get a weird thing when
editing a page: all the parts’ tabs are duplicated! You can see it
here: http://marceloalvim.com/double_parts.jpg. Oh, I also ran rake
radiant:update and rake radiant:update:javascripts. I’m not sure when
I should use those, but I thought it would be better do it than not.

The “Blog” title was edited by me, but other than that, this came from
a regular db:bootstrap. I checked the database, and it had no
duplicated parts associated with the same page.

So I tested it again, cleaning the database and checking out radiant
from revision 575 of the trunk. Again, rake radiant:update and rake
radiant:update:javascripts. No duplicated parts, and I was able to add
and remove parts perfectly. Next step with this setup: installing
Shards. I checked out shards from the latest revision of trunk, and
voilá, the behavior I told you in the first email: upon creating a
part, the error in javascript (as caught by firebug) and the rendering
of the partial with no layout. Whew!

Now, for the last test of all (just to be sure), I tested radiant edge
WITH shards! :slight_smile:
Result: TRIPLE page part tabs, PLUS the error when adding one. Ok,
this one was just not fair. :wink:

So, does anyone have any idea of why might that be happening? Does it
happen to someone else? Am I doing something wrong?

Thanks,
Marcelo.

Hi, Sean.

Thanks for all your hard work, I appreciate it. What I found
particularly weird is that I had these issues with Radiant edge even
without Shards. The “double tabs” problem was very strange. I will
also try to look into it, but I’m not sure I’ll be able to help much.
I’ll talk to you guys later today.

Thanks!
Marcelo.

The “double tabs” issue was a result of a botched patch on my part. The
contents of admin.js were duplicated. Removal of the extra lines
removed the issue.

Sean

Marcelo A. wrote:

snip

Hi Marcelo,

It seems from Sean’s email that the problems should be fixed (already or
soon). Hopefully, it works. I’m not using shard, so can’t comment on
it. I just got involved cos I had a very similar problem just
yesterday!

Cheers,
Mohit.
11/8/2007 | 12:59 AM.

Oh, alright.

I just tested it with the latest trunk revision of both Shards and
Radiant, and it all worked perfectly.

Thank you very much, Sean!

Marcelo.