Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
The problem was, DruTeX retrieves and uses paths at many many places. It couldn't be a solution to use rtrim() on every of these places.
A good solution would be to rtrim() the paths and urls before saving it. But since the settings page has its own submitting/validation functions, I cannot hook somehow inthere and influence how the paths are saved.
But I found another good solution:
Since DruTeX always uses drutex_var_get() to retrieve the paths and urls, I changed the function to automatically rtrim() the slashes of paths and urls. This are the settings that begin with 'drutex_dir' or 'drutex_url', like "drutex_dir_images_$format".
Comments
Comment #1
dfg commentedThe problem was, DruTeX retrieves and uses paths at many many places. It couldn't be a solution to use rtrim() on every of these places.
A good solution would be to rtrim() the paths and urls before saving it. But since the settings page has its own submitting/validation functions, I cannot hook somehow inthere and influence how the paths are saved.
But I found another good solution:
Since DruTeX always uses drutex_var_get() to retrieve the paths and urls, I changed the function to automatically rtrim() the slashes of paths and urls. This are the settings that begin with 'drutex_dir' or 'drutex_url', like "drutex_dir_images_$format".
It works perfect.
Comment #2
(not verified) commented