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

Issue MassiveSearchBundle & Custom Entities #7051

Open
kellerbraeune opened this issue Mar 31, 2023 · 0 comments
Open

Issue MassiveSearchBundle & Custom Entities #7051

kellerbraeune opened this issue Mar 31, 2023 · 0 comments
Labels
Bug Error or unexpected behavior of already existing functionality

Comments

@kellerbraeune
Copy link

Q A
Sulu 2.5.8
PHP 8.1.0
MySQL 5.7.34

Actual Behavior

if you create a custom entity and register it for massive search for using in admin and website search, you get an error message that the custom entity is set private. Through this, you cannot save or delete posts in den custom entity.

It is an error in Sulu or in massive search? How can be fixed it?

Tested in Sulu Workshop, Sulu Demo (Sulu Rocks) and own projects

Expected Behavior

No 500 Error "Cannot access private property App\Entity..."

Steps to Reproduce

E.G. Sulu Workshop

Setup Repository:
https://github.com/sulu/sulu-workshop

Create Folder:
config -> massive-search

Create File:
massive-search -> Event.xml

Code:
<?xml version="1.0" ?> <massive-search-mapping xmlns="http://massiveart.io/schema/dic/massive-search-mapping"> <mapping class="App\Entity\Event"> <id property="id" /> <title expr="join(' ', [object.getTitle()])" /> <url expr="'/events/' ~ object.id" /> <index value="event" /> <locale property="locale" /> <fields> <field name="title" type="string" /> <field name="url" type="int" /> </fields> </mapping> </massive-search-mapping>

Create File:
config -> packages -> sulu-search.yaml

Code:
sulu_search: indexes: events: name: 'Events' icon: 'su-user' view: name: app.event_edit_form result_to_view: id: id locale: locale website: indexes: - events - contact

in terminal:

bin/adminconsole massive:search:reindex

@kellerbraeune kellerbraeune added the Bug Error or unexpected behavior of already existing functionality label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant