Skip to content

Papi ajax - Permalinks settings #218

@nlemoine

Description

@nlemoine

Description

When using a repeater with a group a fields, the "add new" button is broken.

The ajax URL called when hitting the button is returning a 404. I found out the URL is only working when permalinks are enabled.

This should work in any case.

Checking the source code, I also noticed you didn't take advantage of the WordPress ajax "api", this would probably save some bugs (this one included) and provide a "native" way to achieve all the papi ajax stuffs.

There's also a tiny problem with adding your own endpoints with add_rewrite_rule, you need to flush rewrite rules so they can be added to all rewrite rules.

Steps to reproduce

  • Set permalinks to "simple" (?p=123)
  • Add a repeater property with some properties
  • Click on "add new"

What versions of softwares are you using?

  • Browser: Chrome 56
  • Papi: 3.1.18
  • WordPress: 4.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions