| Age | Commit message (Collapse) | Author |
|
|
|
Page#redirect_target resolves the precedence and returns nil for a
destination that is restricted or has no head, so a page with a broken
target renders itself rather than linking nowhere. The banner partial will
call the same method, so the redirect and the link cannot drift.
One hop, no exceptions, checked in publish_draft! rather than as a
validation: two nodes publishing concurrently could each pass a save-time
check and still produce a chain. "Live" means heads only, a draft redirect
that has not published is not yet a link anyone can follow.
Node.search excludes redirecting pages. editor_search does not: an editor
looking for one searches by title, and only the body is worth hiding.
|
|
|
|
The column moved to page.rb and was now written only by publish_draft!
and by the chapter seed, and read by nothing.
lib/tasks/pages.rake goes with it. backfill_external_url reads the dropped
column. backfill_address is spent and no longer safe to re-run.
|
|
|
|
|
|
|
|
|
|
Replaces the two-way admin/user split with four groups ordered by
capability: administration, Redaktion, editors, alumni. alumni takes
precedence over capability in role_group, so a retired admin appears at the
bottom rather than the top.
Forms now offer the three roles as checkboxes rather than a single admin
checkbox, with a trailing hidden blank so an empty set can be posted, and
user_params permits roles only for admins. Three create buttons prefill the
common combinations.
|
|
Every path through Permission raised or lied: validates_presence_of on a
boolean made granted = false unsaveable, since false.blank? is true;
get_permission_for read a nonexistent identifier attribute; has_permission?
called an undefined plural method and returned a truthy relation in every
case; and set_permission mutated granted without saving. Nothing outside the
model referenced it and the table was empty.
|
|
|
|
|
|
- related_assets gains a `headline` boolean (DB-enforced: at most one
per page), replacing "first image by position" as the headline
rule. A rake task backfills the current first image on every live
head/draft, so nothing changes visually until an editor changes it.
- The image picker sidebar gets a star toggle reflecting the flag;
the TinyMCE inline-image picker's badge now reads it too, instead
of assuming position 0.
- No headline chosen (or none attached) now falls back to the
gallery-count caption itself becoming the lightbox trigger, instead
of the gallery being unreachable.
- Assets gain creator, source_url, and license_key (against a new
config/asset_licenses.yml dictionary). asset_credit renders a
degrading attribution line, reused as a hidden per-image glightbox
caption so credit is one click away for every image, not only the
headline's always-visible one.
- Fixed: asset thumbnails rendered unconditionally regardless of
whether a real variant exists on disk. Asset#has_variant? checks
file existence, not content type -- some legacy PDFs have real
pre-rewrite thumbnails a content-type check would have hidden.
- assets#new/edit rebuilt onto the same node_description/node_content
layout as assets#show, picking up the three new fields in the
process.
|
|
|
|
|
|
node_id/page_id/user_id are lookup and ordering only -- all three
nullify on delete, so an entry outlives its actor and its subject.
Everything that must survive those deletions lives in a mandatory
metadata jsonb written once at creation: the actor's username, the
node's human-readable name (pinned to the default locale), and
action-specific extras such as publish's title from/to.
NodeAction.record! is the single constructor, so every entry gets
the same baseline metadata without each call site re-implementing
it. occurred_at is one field for live and backfilled entries alike;
inferred_from distinguishes them -- nil means witnessed at the
moment it happened, populated names how a backfilled entry was
estimated.
Instrumented so far: publish (crediting the actual publisher,
threaded through from the controller -- previously nobody had the
act of publishing recorded anywhere), revert's discard_autosave and
destroy_draft branches, and translation destroy. publish_draft! now
runs in a transaction so the promotion and its log entry land
together. The remaining verbs follow once this mechanism has proven
itself.
|
|
Introduces autosave_id as a third, unversioned layer above draft/head,
with lock_for_editing!, autosave!, and save_draft! as the new entry
points. Also fixes a real bug in wipe_draft!: its "no draft" branch
unconditionally released the lock, which was safe when "no draft" only
ever meant "nothing is happening" — no longer true now that a lock can
exist with only an autosave beneath it. lock_for_editing! deliberately
does not call wipe_draft! at all, for the same reason: an intruder
calling it while a lock was genuinely held would otherwise silently
steal it via wipe_draft!'s own unlock side effect, caught by the new
two-user lock test.
|
|
Root-caused this session: appending a child to any node never widened
that parent's own rgt boundary, on the pinned revision (Gemfile tracked
main directly, chasing a too-conservative gemspec constraint - not, as
first assumed, a deliberate pin to avoid a known bug). Reproduced
cleanly on a single ordinary create with no concurrency and no bulk
operation involved, confirmed via the gem's own SetValidator, then
confirmed as the root cause of nodes_controller_test.rb's 3 long-standing
"pre-existing" failures - not three separate mysteries, one bug.
admin_controller's sitemap needed its own real conversion, not just a
drop-in: awesome_nested_set's lft column implicitly provided correct
depth-first tree order for free, which the old code combined with a
separate class-level each_with_level iterator. Both replaced by one
method, self_and_descendants_ordered_with_level, computing an ordered
[node, level] list in a single query-then-walk pass - checked against
the actual view template first (admin/index.html.erb) rather than
assumed, since it relies on list order alone to render correct visual
nesting.
lft/rgt/depth columns intentionally left in schema, unused - dropping
them is a separate, deliberately deferred migration once this is proven
running for a while, not bundled with the behavior change.
|
|
New column + unique index, plus ensure_preview_token!/revoke_preview_token!
on Page. Generated lazily (only when explicitly requested) rather than
via has_secure_token's default auto-generate-on-create, so a live,
shareable secret isn't silently minted for every page ever created.
|
|
Forms were already cleaned up in an earlier commit; the column itself
was the last remnant.
Dropping the column surfaced a live reference in events#index (fixed
separately, 970f108) - this migration file itself just never got
staged until now.
|
|
Was the last remaining gap in the occurrence-orphaning fix from earlier
this session: dependent: :destroy on Event#occurrences covers deletion
through ActiveRecord, this covers anything that bypasses it (raw SQL,
Model.delete). Confirmed zero existing orphans and zero NULL event_ids
before adding the constraint (event_id stays nullable - an occurrence
without an event is valid, one with a bogus event_id is not). Also adds
the index that should have existed on this column already - Postgres
needs one for the cascade to be anything other than a full table scan
per delete, and none existed before this. deferrable: :immediate added
so legitimate application code can still defer the check within a
transaction if ever needed - unrelated to, and not a fix for, the
fixture-loading issue below.
Applying this constraint broke fixture loading entirely (config fix:
81a07bf) and exposed a live bug in events#index (fix: 970f108), both
already committed separately - this migration file itself just never
got staged until now.
|
|
|
|
|
|
- Event#occurrences is now dependent: :destroy, so destroying an Event
(directly, or via Node's cascade) removes its Occurrence rows instead
of orphaning them.
- Renamed generate_occurences -> generate_occurrences (typo fix);
callback and method updated together.
- Occurrence.generate returns early when event.start_time is nil, so a
chapter with no sourced time produces zero occurrences instead of a
guessed one.
- seed_chapter no longer falls back to 19:00 when start_time is absent;
base_time/end_time are nil in that case.
Database-level foreign key cascade on occurrences.event_id is still
pending.
|
|
|
|
- seed_chapter now accepts events: array instead of flat rrule:/
start_time: params; each event hash supports rrule:, start_time:,
tag_list:, location:, duration_hours:
- Chapters with multiple open days now represented correctly
(Stralsund: Thursday Chaostreff + 2nd/4th Saturday OpenSpace;
Hamburg: 2nd Friday + last Tuesday; Stuttgart: 1st Tuesday +
3rd Wednesday; Freiburg: Mon+Tue open + biweekly Plenum;
Backnang: 3rd Sunday + 1st Tuesday; Tübingen: last Sunday +
2nd Monday at different venues)
- is_primary removed from migration entirely — replaced by
tag_list: 'open-day' on events
- Stale EN descriptions corrected: Berlin, Darmstadt, Erlangen,
Essen, Freiburg, Göttingen, Hamburg, Hannover, Karlsruhe,
Paderborn, Stuttgart, Ulm
- chaostreff-stralsund duplicate entry removed (Port39 is erfa only)
|
|
New public page template for erfa and chaostreff nodes. Renders the
node's external_url and lists associated events below the page content.
Seed script updated to set template_name: 'chapter_detail' on all
chapter drafts so the template is applied on publish.
|
|
- _chapter.html.erb: new partial for erfa/chaostreff aggregated lists;
renders title, location, external_url, sanitized body
- content_helper: fix aggregate attr regex to allow hyphens in values
(erfa-detail tag was silently dropped); add debug logging (remove)
- page.rb: suppress libxml stderr noise in rewrite_links_in_body
- db/seeds/chapters.rb: one-shot seed script for erfa and chaostreff
chapter nodes under parent nodes 548/549; creates bilingual pages,
external_url, primary events with RRULEs where known
Note: run Node.rebuild!(false) after execution to fix lft/rgt values
|
|
- Migration: node_id nullable on events and occurrences, add
title/description/is_primary to events, external_url to nodes
- Existing events marked is_primary: true (were all 1:1 with nodes)
- Node: has_one :event -> has_many :events
- Event: belongs_to :node optional, validates title presence for
standalone events, is_primary uniqueness scoped to node_id,
display_title helper falling back through node title
- Occurrence: belongs_to :node optional, summary falls back to
event.display_title
- nodes_helper: event_information uses events.first (interim; will
be replaced in Phase 3 event UI)
- Tests: fix node.event -> node.events.first in event_test
|
|
|
|
- Fix Page.find(self.head) → self.head in node.rb wipe_draft!
- Migration to delete 407 spurious 'root' locale records from
page_translations (Globalize artefact, all had nil titles and
duplicate de/en translations existed for all affected pages)
|
|
- Restore search vector migration (was parked in doc/ pending PostgreSQL upgrade)
- Restore Node.search using plainto_tsquery with simple dictionary
- Cross-locale keyword search, no stemming, works for both de and en content
|
|
- Bump rails 4.2.11.3 → 5.2.8.1, ruby 2.4.10 → 2.5.8
- Upgrade acts-as-taggable-on ~> 3.5 → ~> 6.0
- Upgrade exception_notification ~> 4.4 → ~> 4.5
- Upgrade globalize ~> 5.0 → ~> 5.2.0
- Upgrade pg ~> 0.17 → ~> 1.0
- Upgrade sass-rails ~> 4.0 → ~> 5.0
- Upgrade libxml-ruby to ~> 3.2 (5.x requires Ruby 3.2+)
- Pin awesome_nested_set ~> 3.4.0 (3.9 has lft/rgt update bug)
- Add rails-controller-testing gem
- Add assets initializer for jquery precompile
- Add acts_as_taggable missing indexes migration
- Set eager_load, serve_static_files, active_record settings
|
|
- Bump acts-as-taggable-on from 2.4.1 to 3.5.0
- Fake engine migrations for pre-existing schema
- Set serve_static_assets in development
- Fix request.fullpath in authenticated_system (request_uri removed in Rails 3.x)
- Fix Paperclip path format to match existing file layout
|
|
- Converted plugins to gems (Gemfile)
- Updated config structure (application.rb, boot.rb, environment.rb)
- Converted routes to Rails 3 DSL
- Converted named_scope to scope throughout models
- Converted find(:all, :conditions) to where() chains
- Fixed has_many :order to use ordering scope
- Updated session store and secret token configuration
- Fixed exception_notification middleware configuration
- Patched Ruby 2.4 / Rails 3.2 incompatibilities:
- Integer/Float duration arithmetic (ActiveSupport)
- Arel visit_Integer for PostgreSQL adapter
- create_database String/Integer coercion
- ActionController consider_all_requests_local
- Migrated taggings schema for acts-as-taggable-on
- Replaced dynamic_form gem with custom form_error_messages helper
- Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for)
- Fixed admin layout yield
- Updated test suite for Rails 3 APIs
|
|
|
|
|
|
|
|
get staged and are applied once that revision is published
|
|
|
|
|
|
|
|
|
|
|
|
action. Will investigate.
|
|
|
|
|
|
|
|
|
|
|