Rails 7.1 Renders Partial Header

Open
#1,329 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, rails, react, ruby

Research direction

Reproduce the issue with Rails 7.1.2, Ruby 3.2.0, react-rails 2.6.2 or 3.1.1, and the listed Sprockets versions. Start by tracing routes that render views with = react_component through the associated layout and pack script; done means the layout header is not emitted as body text before the pack script.

Written by the indexing model from the issue text.

Description

Steps to reproduce

Upgrade Rails to 7.1

Expected behavior

Don't render header as text

Actual behavior

After upgrading to Rails 7.1 routes rendering views with = react_component are rendering the beginning part of the associated master as plain text at the top of the body and before the pack script tag. It appears to be rendering the layout template up to the line that yields the content.

System configuration
  • sprockets (4.1.1)
  • sprockets-rails (3.4.2)
  • react-rails (2.6.2), react-rails (3.1.1)
  • react_ujs@3.1.1
  • rails (7.1.2)
  • ruby 3.2.0
Dominant language
JavaScript
Stars
6.8k
Forks
739
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactjs/react-rails

All issues in reactjs/react-rails

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.