Daniel-KM / Omeka-S-module-CleanUrl

Displays clean and readable URLs like https://example.org/my_collection/dcterms:identifier in Omeka S.
Other
4 stars 4 forks source link

Main base path doesn't work after upgrade from CleanURL 3.15.5 to 3.15.17.1 #4

Closed psalido closed 3 years ago

psalido commented 3 years ago

After upgrade from Omeka S 1.4.0 with CleanURL 3.15.5 to Omeka 2.1.2 with CleanURL 3.15.17.1, URL's gennerated at site ommits any Main base path part configured. So, when you click on generated URL, you get an Omeka S Page not found error.

If you enter correct URL by hand, pages (collections, items...) are accessible.

Seems error on \CleanUrl\src\Router\Http\CleanRoute.php file, function _getUrlPath, line 896:

893                $basePath = '';
894        }
895
896        $mainPath = $withMainPath ? $setting('cleanurl_main_path_full') : '';
897
898        return ($absolute ? $serverUrl() : '') . $basePath . '/' . $mainPath;
899    }

I fix it quickly replacing $setting('cleanurl_main_path_full') with $this->settings['main_path_full']

Daniel-KM commented 3 years ago

This bug has been fixed in the version for Omeka v3.