Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #range-min if low value is adjusted. #15

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

pondermatic
Copy link
Contributor

What was changed

When the slider low value is changed, the #range-min number input is now updated.

Steps to reproduce the issue

  1. Reorder a category with many items. On a monitor that is 1920 px wide, I needed at least 82 items.
  2. Drag the end of the slider to the right until the start of the slider also moves to the right.

Expected behavior

The request sent to the server should have a start value that is 1 less than the "Post range:" range-min input field.

If the post range range-min displayed value is 5, then the first item displayed should be the 5th item in the category.

Actual behavior

The request sent to the server has start set to the same value as the "Post range:" range-min input field.

If the post range range-min displayed value is 5, then the first item displayed is the 6th item in the category.

The range-min that is displayed to the user starts counting from 1. The get_more_posts ajax action and the _get_order() function start counting from 0.

If items are reordered, the last item is duplicated in the wp_postmeta database table. This causes future reordering attempts to fail and the following error to be sent to the PHP log.
WordPress database error Unknown column 'undefined' in 'field list' for query REPLACE INTO wp_postmeta ...

This fixes issue #12.

This probably addresses review Used to Work.

When the slider low value is changed, the `#range-min` number input needs to be updated.
@pondermatic pondermatic deleted the get_order_start branch December 24, 2020 20:33
@pondermatic pondermatic restored the get_order_start branch December 24, 2020 20:34
@pondermatic
Copy link
Contributor Author

I accidentally committed 47637d1 to this branch instead of another.

@pondermatic pondermatic reopened this Dec 24, 2020
@aurovrata aurovrata merged commit 25af259 into aurovrata:master Jan 5, 2021
@aurovrata
Copy link
Owner

thanks for this fix.

Reorder a category with many items. On a monitor that is 1920 px wide, I needed at least 82 items.

are you aware that you can extend the grid size by simply reducing the screen resolution (zoom out on the browser (ctrl + mouse scroll) and the plugin will adjust the grid to maintain a perfect square, allowing you to see more posts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants