apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

widgets with just relationship fields do not work work

Open dainissilamikelis1nce opened this issue 1 year ago • 2 comments

apos version 3.44

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Create a piece
  2. Create widget

Expected behavior

Promotion should be choosable in the field

Describe the bug

Promotion is not choosable in the field

Details

If I add 1 more field it works as-expected (see screenshots)

promotions and _promotions where tested, both do not worked as expected

module.exports = {
  extend: '@apostrophecms/widget-type',
  options: {
    label: 'Promotion Widget with piece',
    alias: 'promotion-with-piece',
    previewImage: 'png',
  },
  fields: {
    add: {
      _promotion: {
        type: 'relationship',
        label: 'Promotion',
        withType: 'promotion',
        max: 1,
      },
    },


  },
};

Version of Node.js: checked on v20.3.1 checked on v18.14.0

Server Operating System: Macos Sonoma 14.1 (23B74)

Screenshots

without extra field - cant select promotion Screenshot 2023-11-14 at 12 00 01

with extra field - can select promotion Screenshot 2023-11-14 at 12 01 23

dainissilamikelis1nce avatar Nov 14 '23 10:11 dainissilamikelis1nce

Thanks for raising this issue, but I could not reproduce this with a fresh project using Apostrophe 3.44.0 or the most current 3.59.0. Please try bringing the project up after removing the apos-build and data folders to see if the problem persists.

BoDonkey avatar Nov 14 '23 13:11 BoDonkey

If the problem does persist please provide a sample project so we can verify it. Thanks Dainis!

boutell avatar Nov 14 '23 13:11 boutell