maglevhq / maglev-core

Ruby on Rails website builder
https://www.maglev.dev
MIT License
273 stars 47 forks source link

Fatal error: Integer does not have #dig method #75

Closed sedubois closed 6 months ago

sedubois commented 9 months ago

I ran the Maglev Avo demo and encountered the above error after creating some blog page in Avo then adding some section in the maglev admin interface. It is generated in:

maglevcms (1.1.7) app/services/concerns/maglev/get_page_sections/transform_collection_item_concern.rb:6:in `dig'

This happens with the editor interface itself (http://localhost:3000/maglev/editor/en/index), so there is no way to recover from the error. Restarting bin/dev does not help. I could also go back to the Avo admin interface and delete the blog page I had created, but the persists in maglev.

``` 19:36:20 web.1 | maglevcms (1.1.7) app/services/concerns/maglev/get_page_sections/transform_collection_item_concern.rb:6:in `dig' 19:36:20 web.1 | maglevcms (1.1.7) app/services/concerns/maglev/get_page_sections/transform_collection_item_concern.rb:6:in `transform_collection_item_content_setting' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:94:in `transform_content_setting' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:83:in `block in transform_section_settings' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:79:in `each' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:79:in `transform_section_settings' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:46:in `transform_section' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:25:in `block in call' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:24:in `map' 19:36:20 web.1 | maglevcms (1.1.7) app/services/maglev/get_page_sections.rb:24:in `call' 19:36:20 web.1 | maglev-injectable (2.1.1) lib/injectable/instance_methods.rb:18:in `call' 19:36:20 web.1 | maglevcms (1.1.7) app/controllers/concerns/maglev/fetchers_concern.rb:38:in `fetch_maglev_page_sections' 19:36:20 web.1 | maglevcms (1.1.7) app/controllers/maglev/page_preview_controller.rb:31:in `fetch_maglev_page_sections' 19:36:20 web.1 | maglevcms (1.1.7) app/controllers/concerns/maglev/fetchers_concern.rb:21:in `fetch_maglev_page_content' 19:36:20 web.1 | maglevcms (1.1.7) app/controllers/concerns/maglev/rendering_concern.rb:16:in `render_maglev_page' 19:36:20 web.1 | maglevcms (1.1.7) app/controllers/maglev/page_preview_controller.rb:13:in `index' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' 19:36:20 web.1 | actionpack (7.0.4) lib/abstract_controller/base.rb:215:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/rendering.rb:53:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/abstract_controller/callbacks.rb:234:in `block in process_action' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/callbacks.rb:118:in `block in run_callbacks' 19:36:20 web.1 | actiontext (7.0.4) lib/action_text/rendering.rb:20:in `with_renderer' 19:36:20 web.1 | actiontext (7.0.4) lib/action_text/engine.rb:69:in `block (4 levels) in ' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `instance_exec' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/callbacks.rb:138:in `run_callbacks' 19:36:20 web.1 | actionpack (7.0.4) lib/abstract_controller/callbacks.rb:233:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/rescue.rb:22:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/notifications.rb:206:in `instrument' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:66:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal/params_wrapper.rb:259:in `process_action' 19:36:20 web.1 | activerecord (7.0.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action' 19:36:20 web.1 | actionpack (7.0.4) lib/abstract_controller/base.rb:151:in `process' 19:36:20 web.1 | actionview (7.0.4) lib/action_view/rendering.rb:39:in `process' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal.rb:188:in `dispatch' 19:36:20 web.1 | actionpack (7.0.4) lib/action_controller/metal.rb:251:in `dispatch' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:32:in `serve' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/routing/mapper.rb:18:in `block in ' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/routing/mapper.rb:48:in `serve' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/journey/router.rb:50:in `block in serve' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `each' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `serve' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:852:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/static.rb:23:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/static.rb:161:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/tempfile_reaper.rb:15:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/etag.rb:27:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/conditional_get.rb:27:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/head.rb:12:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/http/permissions_policy.rb:38:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/http/content_security_policy.rb:36:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/session/abstract/id.rb:266:in `context' 19:36:20 web.1 | rack (2.2.4) lib/rack/session/abstract/id.rb:260:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/cookies.rb:696:in `call' 19:36:20 web.1 | activerecord (7.0.4) lib/active_record/migration.rb:603:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/callbacks.rb:99:in `run_callbacks' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/executor.rb:14:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call' 19:36:20 web.1 | web-console (4.2.0) lib/web_console/middleware.rb:132:in `call_app' 19:36:20 web.1 | web-console (4.2.0) lib/web_console/middleware.rb:28:in `block in call' 19:36:20 web.1 | web-console (4.2.0) lib/web_console/middleware.rb:17:in `catch' 19:36:20 web.1 | web-console (4.2.0) lib/web_console/middleware.rb:17:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call' 19:36:20 web.1 | railties (7.0.4) lib/rails/rack/logger.rb:40:in `call_app' 19:36:20 web.1 | railties (7.0.4) lib/rails/rack/logger.rb:25:in `block in call' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/tagged_logging.rb:99:in `block in tagged' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/tagged_logging.rb:37:in `tagged' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/tagged_logging.rb:99:in `tagged' 19:36:20 web.1 | railties (7.0.4) lib/rails/rack/logger.rb:25:in `call' 19:36:20 web.1 | sprockets-rails (3.4.2) lib/sprockets/rails/quiet_assets.rb:13:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/remote_ip.rb:93:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/request_id.rb:26:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/method_override.rb:24:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/runtime.rb:22:in `call' 19:36:20 web.1 | activesupport (7.0.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/server_timing.rb:61:in `block in call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/server_timing.rb:26:in `collect_events' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/server_timing.rb:60:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/executor.rb:14:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/static.rb:161:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/static.rb:23:in `call' 19:36:20 web.1 | rack (2.2.4) lib/rack/sendfile.rb:110:in `call' 19:36:20 web.1 | actionpack (7.0.4) lib/action_dispatch/middleware/host_authorization.rb:137:in `call' 19:36:20 web.1 | vite_ruby (3.2.13) lib/vite_ruby/dev_server_proxy.rb:22:in `perform_request' 19:36:20 web.1 | rack-proxy (0.7.4) lib/rack/proxy.rb:78:in `call' 19:36:20 web.1 | railties (7.0.4) lib/rails/engine.rb:530:in `call' 19:36:20 web.1 | puma (5.6.5) lib/puma/configuration.rb:252:in `call' 19:36:20 web.1 | puma (5.6.5) lib/puma/request.rb:77:in `block in handle_request' 19:36:20 web.1 | puma (5.6.5) lib/puma/thread_pool.rb:340:in `with_force_shutdown' 19:36:20 web.1 | puma (5.6.5) lib/puma/request.rb:76:in `handle_request' 19:36:20 web.1 | puma (5.6.5) lib/puma/server.rb:443:in `process_client' 19:36:20 web.1 | puma (5.6.5) lib/puma/thread_pool.rb:147:in `block in spawn_thread' ```
did commented 6 months ago

hey @sedubois, old issue when it should be solved by the last commits I made on Maglev. I also updated the Maglev Avo git repository. thanks again!