Automattic / Automattic/jetpack

Infinite scroll query_args does not respect "tag"

Open
#22,573 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Infinite Scroll [Plugin] Jetpack [Pri] Low Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Steps to Reproduce

1. Enable infinite scroll module on Jetpack
2. Modify the `infiniteScroll.settings.query_args.tag` via JS or PHP function e.g. `infiniteScroll.settings.query_args.tag = 'tag'`
3. Test infinite scroll; the tag setting is not applied and it loads all posts regardless of tag.

### A clear and concise description of what you expected to happen.

This should filter posts by tag per the query_args settings.

### What actually happened

The tag setting is ignored and posts load without applying that filter.

### Other information

When I view the XHR request in the console, I can see that my setting is being applied in the request, but the response does not apply the setting.

![Screen Shot 2022-01-31 at 1 10 39 PM](https://user-images.githubusercontent.com/9422619/151849172-920690c3-ef4a-44c1-91c7-fe40482083eb.png)

However, applying the same method described above to change the 'category' query_args works as expected.

### Operating System

macOS

### OS Version

_No response_

### Browser

Chrome/Chromium, Firefox, Safari

### Browser Version(s)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the infiniteScroll.settings.query_args.tag setting and inspect the XHR request and response path, comparing it with the working category query_args behavior. Reproduce the issue with a tag value, then verify that infinite scroll loads only posts matching that tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, wordpress
Domain
full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.