-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
The ai_sorting module needs to expose the experiment report URL in drupalSettings so that DXPR Builder can link to the experiment reports page without hardcoding the URL structure.
Steps to reproduce
- Enable ai_sorting on a View
- Open the page with DXPR Builder
- Click the 3-dot menu on the View element
- Click "View AI Experiment" link
- Nothing happens - the link fails silently
What is the current bug behavior?
DXPR Builder expects drupalSettings.rl.views[viewKey] but ai_sorting exposes drupalSettings.aiSorting.views[viewKey]. Additionally, DXPR Builder expected an experimentBasePath that was never exposed.
What is the expected correct behavior?
The ai_sorting module should expose the full experiment report URL in drupalSettings so consuming modules don't need to know the URL structure.
Possible fixes
Add experimentUrl to the drupalSettings output in ai_sorting_views_pre_render() using Drupal's URL generation:
$experiment_url = Url::fromRoute('rl.reports.experiment_detail', [
'experiment_id' => $experiment_id,
])->toString();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels