• Inserting a Vote (thumbs up/down) is for all pages, so users cant vote for a single page/post. I can insert it on three pages, giving it three different headlines (so i can identify them in backend), but the last one is valid only. One ounter/vote for three different pages – is that intended?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpRigel

    (@wprigel)

    Hi @mcian,

    Could you please clarify more about your scenario. We didn’t get your point.

    If I am not wrong, You created Up/Down vote as a pattern and that pattern you used on 3 pages, But when user do vote in all pages, its count only one vote for last page? Am I right ?

    Thanks

    Thread Starter jansass GmbH

    (@mcian)

    Hey,

    i think i found it: when adding “Vote” to a page manually, it works (each page has its own vote counter). When adding it by an unsynced reuasable, it does not work (each page has the SAME counter). Thats because you encode it using “pollClientId”:”896c7de4-ff68-4a6c-9806-…

    Is that the same for all other functions as well? Cant i use them as non-synced reusables?

    Marc

    Plugin Author wpRigel

    (@wprigel)

    Hi @mcian,

    This is actually a default block behaviour. The unsynced patterns just keep the reference on the editor. So it’s hard to track the poll ID and render the polls. So when you use it as a pattern, it will work only for one poll for all pages. Not each page has with different poll. For using a different poll for a different page, you need to add that poll separately

    Thanks

    Thread Starter jansass GmbH

    (@mcian)

    @wprigel

    Actually, this is not correct. Correct is that synced (!) patterns should use the same ID, unsynced should create NEW ID upon insertion, else they would refer to the original (synced). So your plugin need to hook to insertBlocks() https://developer.ww.wp.xz.cn/block-editor/reference-guides/data/data-core-block-editor/

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.