Closed richlarcombe closed 8 years ago
Nice catch, we need to fix it not to make a venues page in the seeds.
For now: Find the Venues page in your Pages area, edit it to remove the Forward this page URL under Advanced Options
Then you should be able to delete it
On Friday, June 8, 2012 at 1:27 AM, Rich Larcombe wrote:
Not sure where we're up to in terms of 2.0 ready'ness!
But just tried it out on a clean refinery 2.0.4 & postgres install: Not knowing what to expect as trying this gem out for the first time, but is this helps anyone?
- new 'venues' menu item appeared on the front end,
- clicking this cause it to fall over with the following (even after venue data is in the db)
ActionView::Template::Error (undefined method
each' for nil:NilClass): 1: <% content_for :body_content_left do %> 2: <ul id="venues"> 3: <% @venues.each do |venue| %> 4: <li> 5: <%= link_to venue.name (http://venue.name), refinery.calendar_venue_path(venue) %> 6: </li> /Users/rlarcombe/.rvm/gems/ruby-1.9.3-p125@refinery2.0 (mailto:ruby-1.9.3-p125@refinery2.0)/bundler/gems/refinerycms-calendar-1587e0550295/app/views/refinery/calendar/venues/index.html.erb:3:in
block in _sers_rlarcombervm_gems_ruby_prefinerybundler_gems_refinerycmscalendare____app_views_refinery_calendar_venues_index_html_erb896554352859260886_70126231033580' actionpack (3.2.3) lib/action_view/helpers/capture_helper.rb:40:inblock in capture' actionpack (3.2.3) lib/action_view/helpers/capture_helper.rb:187:in
with_output_buffer'
- next tried loggin in adding a venue, seem to save ok
- then moved to add an event, fell over with this upon trying to save.
ActionView::Template::Error (PG::Error: ERROR: non-integer constant in ORDER BY LINE 1: ...ents".* FROM "refinery_calendar_events" ORDER BY 'from' DES... ^ : SELECT "refinery_calendar_events".* FROM "refinery_calendar_events" ORDER BY 'from' DESC LIMIT 20 OFFSET 0): 1:
2: <%= render :partial => 'event', :collection => @events %> 3:
4: <%= render '/refinery/admin/sortable_list', 5: :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true %> activerecord (3.2.3) lib/active_record/connection_adapters/postgresql_adapter.rb:1139:in `async_exec'Assume i've either missed something or it's not yet ready for prime time?
Reply to this email directly or view it on GitHub: https://github.com/resolve/refinerycms-calendar/issues/23
Cheers - that helps part a of my question (although still unable to delete it but that's not important),
The question i'm really asking is that this codebase in a testable state, or am i wasting you time report stuff you already know?
i.e part b of my question, saving the first calendar entry is kinda fundamental? was just concerned that i've missed a step somewhere: i just followed your:
gem 'refinerycms-calendar', :git => 'git://github.com/resolve/refinerycms-calendar.git', :branch => '2-0-stable'
$ bundle
$ rails g refinery:calendar
$ rake db:migrate db:test:prepare
oh the gem is released now, check the updated installation instructions on master
Joe Sak 517 944 5230
On Friday, June 8, 2012 at 1:43 AM, Rich Larcombe wrote:
Cheers - that helps part a of my question (although still unable to delete it but that's not important), The question i'm really asking is that this codebase in a testable state, or am i wasting you time report stuff you already know? i.e part b of my question, saving the first calendar entry is kinda fundamental? was just concerned that i've missed a step somewhere: i just followed your: gem 'refinerycms-calendar', :git => 'git://github.com/resolve/refinerycms-calendar.git' (http://github.com/resolve/refinerycms-calendar.git'), :branch => '2-0-stable' $ bundle $ rails g refinery:calendar $ rake db:migrate db:test:prepare
Reply to this email directly or view it on GitHub: https://github.com/resolve/refinerycms-calendar/issues/23#issuecomment-6195588
Yep - tried that way also, again clean install, just clicking on calendar. Thanks for trying to assist though, think it's the friday afternoon quick test that just isn't going to happen!
ActionView::Template::Error (PG::Error: ERROR: relation "refinery_calendar_events" does not exist LINE 4: WHERE a.attrelid = '"refinery_calendar_events"'... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"refinery_calendar_events"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): 2: <%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %> 3: <% end %> 4:
Looks like migration needs to be run, be sure full instructions followed here
https://github.com/resolve/refinerycms-calendar/blob/master/readme.md
On Friday, June 8, 2012 at 2:10 AM, Rich Larcombe wrote:
Yep - tried that way also, again clean install, just clicking on calendar. Thanks for trying to assist though, think it's the friday afternoon quick test that just isn't going to happen!
ActionView::Template::Error (PG::Error: ERROR: relation "refinery_calendar_events" does not exist LINE 4: WHERE a.attrelid = '"refinery_calendar_events"'... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"refinery_calendar_events"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum ): 2:
<%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %>
3: <% end %> 4:5: <% if @events.any? %> 6: <%= render 'events' %> 7: <% else %> 8:
Reply to this email directly or view it on GitHub: https://github.com/resolve/refinerycms-calendar/issues/23#issuecomment-6195869
Turns out it's a postgres reserve word issue. The 'from' in the admin/events_controller
crudify :'refinery/calendar/event', :xhr_paging => true, :sortable => false, :order => "'from' DESC"
i'm proposing just to go with:
crudify :'refinery/calendar/event', :xhr_paging => true
To enable the events to be reordered via the default refinery reorder controls, any reason not to go this way?
because events ought to be ordered by their start dates
the quotes around from should make it work, did you try refinery_calendar_events.from in its place?
we might rename that column if it's going to be a problem
On Friday, June 8, 2012 at 8:59 AM, Rich Larcombe wrote:
Turns out it's a postgres reserve word issue. The 'from' in the admin/events_controller
crudify :'refinery/calendar/event', :xhr_paging => true, :sortable => false, :order => "'from' DESC"
i'm proposing just to go with:
crudify :'refinery/calendar/event', :xhr_paging => true
To enable the events to be reordered via the default refinery reorder controls, any reason not to go this way?
Reply to this email directly or view it on GitHub: https://github.com/resolve/refinerycms-calendar/issues/23#issuecomment-6203384
Yep - agree the column should be renamed. But thinking about it this is probably easiest in the long run if i go off an do my own thing on a fork for a bit, you can check back and see if there's stuff you wish to grab at a later date. Thanks for chipping in, but think we're going to be heading in different directions with not just this but also with others already identified in other issues as i have a specific need for this gem.
I'll try to put details on where i'm heading in a doc so others can jump onboard if interested.
To wrap up on this one, quotes or prefixing the table name didn't help, but no drama, i want to order by position in the back end anyway, so feel free to close/fix/leave as you see most appropriate:
ActionView::Template::Error (PG::Error: ERROR: non-integer constant in ORDER BY LINE 1: ...ents".* FROM "refinery_calendarevents" ORDER BY 'refinery... ^ : SELECT "refinery_calendar_events".* FROM "refinery_calendar_events" ORDER BY 'refinery_calendar_events.from' DESC LIMIT 20 OFFSET 0): 1:
I just installed the latest and am also running into these problems. Anybody working on fixing these bugs? Or do you know of an alternative to refinerycms-calendar that is refinery2 ready?
Not from my end - sorry. My req didn't really need a full calendar - so just used a custom date driven engine instead. Please provide an update if you do find something - useful for future reference.
Overrriding events_controller.rb found and copied like it was explained above, just changing the line :order => "'from' DESC" to :order => "refinery_calendar_events.from DESC" solve the issue for me.
Refinery CMS 2.0 is deprecated, please use version 3.0
Not sure where we're up to in terms of 2.0 ready'ness!
But just tried it out on a clean refinery 2.0.4 & postgres install: Not knowing what to expect as trying this gem out for the first time, but is this helps anyone?
ActionView::Template::Error (undefined method
each' for nil:NilClass): 1: <% content_for :body_content_left do %> 2: <ul id="venues"> 3: <% @venues.each do |venue| %> 4: <li> 5: <%= link_to venue.name, refinery.calendar_venue_path(venue) %> 6: </li> /Users/rlarcombe/.rvm/gems/ruby-1.9.3-p125@refinery2.0/bundler/gems/refinerycms-calendar-1587e0550295/app/views/refinery/calendar/venues/index.html.erb:3:in
block in _sers_rlarcombervm_gems_ruby_prefinerybundler_gems_refinerycmscalendare____app_views_refinery_calendar_venues_index_html_erb896554352859260886_70126231033580' actionpack (3.2.3) lib/action_view/helpers/capture_helper.rb:40:inblock in capture' actionpack (3.2.3) lib/action_view/helpers/capture_helper.rb:187:in
with_output_buffer'ActionView::Template::Error (PG::Error: ERROR: non-integer constant in ORDER BY LINE 1: ...ents".* FROM "refinery_calendar_events" ORDER BY 'from' DES... ^ : SELECT "refinery_calendar_events".* FROM "refinery_calendar_events" ORDER BY 'from' DESC LIMIT 20 OFFSET 0): 1:
2: <%= render :partial => 'event', :collection => @events %> 3:
4: <%= render '/refinery/admin/sortable_list', 5: :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true %> activerecord (3.2.3) lib/active_record/connection_adapters/postgresql_adapter.rb:1139:in `async_exec'Assume i've either missed something or it's not yet ready for prime time?