|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Updating a custom extension for 0.6.7Hi everybody, I have inherited a Radiant project from a developer whose is no longer participating in any way. So I am trying to take over and could use some help updating an extension for 0.6.7. As a warning, my programming skills typically end at HTML/CSS, and although I am really enjoying learning as much as possible about Rails and Ruby through Radiant and am eager to dig in, I still don't know much, so please forgive my ignorance! Lemme start by explaining what I think I understand, and see if that's enough for anyone to give me some guidance. A billion thank yous in advance. 1. The extension adds 2 tabs to the Radiant admin interface to the right of the Layouts tab. I assume the extension used shards in 0.6.4 (previous version I used) to do that, yeah? 2. I've now removed shards and updated to 0.6.7 (successfully, I think), except now when I click on the new tabs created by the extension, I first get an error page that says, "Application error (Apache) Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/ 500.html", and upon a page refresh I get the usual Radiant interface with the tabs across the top with a "Page Not Found The page you were looking for could not be located on this site." 3. On the Radiant blog post about the 0.6.7 release, Sean made the following note: "Attention extension developers: If you were using “shards” to modify the user views, please verify that your extension is unaffected. The structure of the partials and regions in the edit view has slightly changed." Might this be my problem? I realize that this is all probably a little too vague to be helpful yet, but perhaps might give you a first inkling about what may be wrong? I'll gladly reply with anything I can find that you might think would be useful. Thanks again, Willhaus --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7On Jul 3, 2008, at 6:52 PM, willhaus wrote: > > Hi everybody, > > I have inherited a Radiant project from a developer whose is no longer > participating in any way. So I am trying to take over and could use > some help updating an extension for 0.6.7. As a warning, my > programming skills typically end at HTML/CSS, and although I am really > enjoying learning as much as possible about Rails and Ruby through > Radiant and am eager to dig in, I still don't know much, so please > forgive my ignorance! > > Lemme start by explaining what I think I understand, and see if that's > enough for anyone to give me some guidance. A billion thank yous in > advance. > > 1. The extension adds 2 tabs to the Radiant admin interface to the > right of the Layouts tab. I assume the extension used shards in 0.6.4 > (previous version I used) to do that, yeah? Nope. That was there before Shards. Look at the "def activate" method in the whatever_extension.rb file in the root of that extension. For example: admin.tabs.add "Help", "/admin/help", :after => "Layouts", :visibility => [:all] > 2. I've now removed shards and updated to 0.6.7 (successfully, I > think), except now when I click on the new tabs created by the > extension, I first get an error page that says, "Application error > (Apache) Change this error message for exceptions thrown outside of an > action (like in Dispatcher setups or broken Ruby code) in public/ > 500.html", and upon a page refresh I get the usual Radiant interface > with the tabs across the top with a "Page Not Found The page you were > looking for could not be located on this site." For some reason the 500 error page says that the error is in Apache. It shouldn't, but it is hard-coded in there. Take a look it your production.log file. If you are in a command line window on the server (assuming unix) cd into the application root and type: tail -200 log/production.log That should print the last 200 lines of the log file to the screen. Try to cause the error right before you do this so that it is the last thing in the log. You should see a long stack trace of the error message in there and it will help pinpoint the problem. If you can't make heads or tails of it, copy it to a pastie (http://pastie.org) and send a link back to the list for help. > 3. On the Radiant blog post about the 0.6.7 release, Sean made the > following note: "Attention extension developers: If you were using > “shards” to modify the user views, please verify that your extension > is unaffected. The structure of the partials and regions in the edit > view has slightly changed." Might this be my problem? It doesn't sound like it. Shards was created to allow you to edit things like the page editing interface, but from what I gather you simply can't get to the regular pages for your extension. > I realize that this is all probably a little too vague to be helpful > yet, but perhaps might give you a first inkling about what may be > wrong? I'll gladly reply with anything I can find that you might think > would be useful. Good luck. Write back with whatever you find. -Jim --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7> Take a look it your production.log file. > If you are in a command line window on the server (assuming unix) cd > into the application root and type: > tail -200 log/production.log > > That should print the last 200 lines of the log file to the screen. > Try to cause the error right before you do this so that it is the last > thing in the log. > > You should see a long stack trace of the error message in there and it > will help pinpoint the problem. If you can't make heads or tails of > it, copy it to a pastie (http://pastie.org) and send a link back to > the list for help. > Thanks bunches, Jim. I just checked out the production log and below is the salient bit, I think. Doesn't make loads of sense to me, although I wonder if that Parameters line is pointing to the problem. Does it help you spot anything? http://pastie.org/228163 > Good luck. Write back with whatever you find. Thanks again! --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7On Jul 5, 2008, at 10:35 AM, willhaus wrote: >> Take a look it your production.log file. >> If you are in a command line window on the server (assuming unix) cd >> into the application root and type: >> tail -200 log/production.log >> >> That should print the last 200 lines of the log file to the screen. >> Try to cause the error right before you do this so that it is the >> last >> thing in the log. >> >> You should see a long stack trace of the error message in there and >> it >> will help pinpoint the problem. If you can't make heads or tails of >> it, copy it to a pastie (http://pastie.org) and send a link back to >> the list for help. >> > > Thanks bunches, Jim. I just checked out the production log and below > is the salient bit, I think. Doesn't make loads of sense to me, > although I wonder if that Parameters line is pointing to the problem. > Does it help you spot anything? > > http://pastie.org/228163 It says ActionController::UnknownAction (No action responded to index): So check to see if you have an index method created in your controller. It's possible that you have something like 'map.resources :lawyers' in your extension file so it expects an index method by default, but perhaps it was first created with something like 'home' as the index- like method. When you see a stack trace like that, start looking through it for information that comes out of your code and you'll know where to look. All of those lines say something like '/vendor/radiant/blah/blah...' but you'll want to look for a path to your own stuff, like: "/vendor/extensions/lawyers/app/controllers/admin/ lawyers_controller.rb:9 in 'index'" And then you'll know to look at line 9 in the index method of lawyers_controller.rb That's just an example. --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7On Jul 5, 1:03 pm, Jim Gay <j...@...> wrote: > It says > ActionController::UnknownAction (No action responded to index): > So check to see if you have an index method created in your controller. > It's possible that you have something like 'map.resources :lawyers' in > your extension file so it expects an index method by default, but > perhaps it was first created with something like 'home' as the index- > like method. > > When you see a stack trace like that, start looking through it for > information that comes out of your code and you'll know where to look. > All of those lines say something like '/vendor/radiant/blah/blah...' > but you'll want to look for a path to your own stuff, like: > "/vendor/extensions/lawyers/app/controllers/admin/ > lawyers_controller.rb:9 in 'index'" > And then you'll know to look at line 9 in the index method of > lawyers_controller.rb > That's just an example. Okay, thanks. I'll dig around some more. To that end I realized that my snippet from the log file before was incomplete - it only showed the data from the "Page Not Found" error. The following pastie also shows the prior 500 error- http://pastie.org/228220 And to the degree they might be are helpful- my extension.rb file: http://pastie.org/228223 my lawyers_controller.rb file with the offending scaffold: http://pastie.org/228226 Thanks again - on a holiday weekend no less! --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7On Jul 5, 2008, at 2:18 PM, willhaus wrote: > To that end I realized that my snippet from the log file before was > incomplete - it only showed the data from the "Page Not Found" error. > The following pastie also shows the prior 500 error- > http://pastie.org/228220 > > And to the degree they might be are helpful- > my extension.rb file: http://pastie.org/228223 > my lawyers_controller.rb file with the offending scaffold: http://pastie.org/228226 The controller looks like it was done circa 1.1.x rails (if I remember correctly) Change the 'list' method to 'index' and rename the view files likewise and see if that helps... Although that "scaffold :lawyer" may be your view files... I've never used that, and I don't know what the status of that is on Rails 2 Radiant 0.6.7 is using Rails 2.0.2 and some things are different. Someone more knowledgeable might jump in with better info. Rails 1.1 used a list method that is the same as index; the name was changed. After that, you may run into problems with "paginate" being an undefined method since Rails 2 dropped built-in pagination. You may already have a pagination plugin that handles that for you. But, we're starting to get into unknown territory since you're the only one with it in front of you. Try changing the list method to index and see where that gets you. --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Updating a custom extension for 0.6.7On Sat, Jul 5, 2008 at 6:35 PM, Jim Gay <jim@...> wrote:
Okay. I'l starting digging around - I think you've been as clear as I could have hoped. Many thanks again. I'll post back with any discoveries. -W --~--~---------~--~----~------------~-------~--~----~ Radiant CMS Dev Mailing List Post: radiantcms-dev@... Unsubscribe: radiantcms-dev-unsubscribe@... Group Site: http://groups.google.com/group/radiantcms-dev/ -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |