- 🇭🇷Croatia milosr Croatia, Montenegro
@jukka792
Can you check when hovering over the flag link if there's something like this in the link: "/typeerror-null-given"?
- Status changed to Closed: works as designed
7 months ago 11:24am 12 April 2024
Hi,
Indexed 2 different flags, 1 of them is content related flag and 1 is flag for user.
The content related flag works, but when clicking the user related flag, got this error and the flag is not flagged:
TypeError: Drupal\flag\FlagService::flag(): Argument #2 ($entity) must be of type Drupal\Core\Entity\EntityInterface,
null given, called in /var/www/html/site/web/modules/contrib/flag/src/Controller/ActionLinkController.php on line 78 in Drupal\flag\FlagService->flag()
(line 281 of /var/www/html/site/web/modules/contrib/flag/src/FlagService.php)
1. create flag type of "user"
sert scope: personal
linkt type: ajax link
Display link as field
1.1 create flag type of "content"
2. create index
data sources: content,flagging,user
2.1 select processors
content access
double quote workaround
flag indexing
reverse entity references
2.2 select fields
General:
both flags
entity type
URI
2.3 Flagging
Entity » Content » ID
flag_id
ID
User ID » User » User ID (uid:entity:uid)
2.4 User
search_api_reverse_entity_references_flagging__uid:uid
search_api_reverse_entity_references_flagging__uid:flag_id
3. create view
add indexed flags as fields
RESULT
the content related flag is working,
but the user related creates error and is not flagged.
Closed: works as designed
1.5
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@jukka792
Can you check when hovering over the flag link if there's something like this in the link: "/typeerror-null-given"?