Skip to content

Resolved #4189 where {if logged_in} variable was parsed late without a reason#4824

Merged
TomJaeger merged 2 commits into7.devfrom
bug/7.x/logged_in_parsing_order
Jun 16, 2025
Merged

Resolved #4189 where {if logged_in} variable was parsed late without a reason#4824
TomJaeger merged 2 commits into7.devfrom
bug/7.x/logged_in_parsing_order

Conversation

@intoeetive
Copy link
Contributor

Resolved #4189 where {if logged_in} variable was parsed late without a reason

It would not hurt if we make it parse a little earlier

@intoeetive intoeetive added this to the 7.x milestone May 5, 2025
@intoeetive intoeetive added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label May 5, 2025
@intoeetive intoeetive modified the milestones: 7.x, 7.5.12 May 14, 2025
@TomJaeger TomJaeger modified the milestones: 7.5.12, 7.5.13 May 14, 2025
@TomJaeger TomJaeger requested a review from robinsowell June 4, 2025 20:28
Copy link
Contributor

@robinsowell robinsowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with:

{if logged_out}
	{exp:query sql="SELECT title from exp_channel_titles where entry_id='1'"}
		{title}
	{/exp:query}	
{/if}

{if !segment_3}
	{exp:query sql="SELECT title from exp_channel_titles where entry_id='2'"}
		{title}
	{/exp:query}
{/if}

{if logged_in}
	{exp:query sql="SELECT title from exp_channel_titles where entry_id='3'"}
		{title}
	{/exp:query}
{/if}
test the parsing

Then looked at template debug output queries. Before change, I had 2 queries (with a segment 3), after, I just had the last query.

Looks good! And no errors logged testing logged out and showed expected data.

@TomJaeger TomJaeger merged commit 6424bfb into 7.dev Jun 16, 2025
22 checks passed
@TomJaeger TomJaeger deleted the bug/7.x/logged_in_parsing_order branch June 16, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does the redirect not stop the parsing of templates?

3 participants