symphonists / uniondatasource

A union datasources allows you to combine multiple datasources to output a single datasource for the primary purpose of a unified pagination.
13 stars 11 forks source link

Renaming Data Sources #13

Open nilshoerrmann opened 12 years ago

nilshoerrmann commented 12 years ago

When a Data Source that is included in a Union Data Source has been renamed, front-end and Data Source editor break with the following error:

Symphony Fatal Error: Could not find Data Source stream. If it was provided by an Extension, ensure that it is installed, and enabled.

176         public static function create($handle, array $env = null, $process_params=true){
177             $classname = self::__getClassName($handle);
178             $path = self::__getDriverPath($handle);
179
180             if(!is_file($path)){
181                 throw new Exception(
182                     __('Could not find Data Source %s.', array('<code>' . $handle . '</code>'))
183                     . ' ' . __('If it was provided by an Extension, ensure that it is installed, and enabled.')
184                 );
185             }
nilshoerrmann commented 12 years ago

In my eyes, Union DS should not break but just ignore the missing DS by either saving an error in the logs, displaying a system message in the DS editor and/or adding a note to the front-end XML (<error type="missing" handle="handle-of-missing-ds">name of missing DS</error>).

brendo commented 12 years ago

I agree, it's actually exposed a bit of a hole in the DatasourcePostEdit and EventPostEdit delegates as these don't give you any indication if the datasource or event has been renamed.

Something to fix for 2.3.1 :)

brendo commented 11 years ago

It's now possible to do this, so I should do it.

nilshoerrmann commented 10 years ago

I just reencountered this issue so what needs to be done to fix it?