Search

Actually, setting the search index param min-word-length to 0 solves the problem. But the problem still occurs if it set to 1.

If it is set above above 1 then it seams to occur with any character as long as the string is lower than min-word-length.

Not sure it is related to Union Datasource. But there are no SQL error without.

Union Datasource updated to version 1.0 on 7th of June 2012

Thanks Brendan! This was on my list of must-haves before updating to 2.3.

Thank you very much. This was also on my list of must-haves before updating to 2.3.

No worries. I have just realised I failed to mention that you will need to recreate your Union Datasources in 2.3 for them to work. Sorry, but should only take a couple of minutes :)

After updated to Symphony 2.3 and Union Datasource 1.0.1, and recreating my Union Datasources I receive the following error on the front end:

Fatal error: Class 'SectionManager' not found in /Users/brian/Sites/briandrum.net/public_html/extensions/uniondatasource/data-sources/datasource.union.php on line 449

Searching the forum lead me to this comment, which lead me to this commit. I have no idea what I'm doing, but adding require_once(TOOLKIT . '/class.sectionmanager.php'); to the top of data-sources/datasource.union.php seems to resolve that issue and reveal another:

An error occurred in /Users/brian/Sites/briandrum.net/public_html/extensions/uniondatasource/data-sources/datasource.union.php around line 609

604                     // New changes to sorting mean that there possibly wont't be a join
605                     // on the entry data table. If the join is omitted from `$joins`,
606                     // we'll add the default join ourselves
607                     preg_match('/^`(.*)`./i', $sort_field[1], $sym_alias);
608                     if(!preg_match('/`' . $sym_alias[1] . '`/', $joins)) {
609                         $joins .= sprintf("LEFT OUTER JOIN `sym_entries_data_%1$d` AS `%2$s` ON (`e`.`id` = `%2$s`.`entry_id`)", $field->get('id'), $sym_alias[1]);
610                     }
611                 }
612             }
613

Seems like sprintf doesn't like the double quotes on line 609. Changed it to single quotes and it worked.

I had the exact same problem with sprintf (mine was on line 608). I also changed the double quotes to single quotes, which solved it.

Sorry for not spotting this earlier, I've pushed a commit to the integration branch that replaces double quotes with single quotes. Out of curiosity, what version of PHP are you running? I've never seen this error before.

I recently got an error;

Fatal error: Call to a member function get() on a non-object in /home/--/public_html/log/extensions/uniondatasource/data-sources/datasource.union.php on line 237

All was fine until I tried to modify a union DS. Running on PHP 5.3.x and a different copy of the site (local) running on PHP 5.4.4. Any thoughts?

Update [09/26/2012] I installed a vanilla version of symphony, and started rebuilding my site piece by piece to see when this error would occur. All I did was create one DS (no problems), delete 2 sections, modify one section and then create two new sections and then the error showed up.

Ok, that error is because you have a datasource in your installation that is referencing a Symphony section that no longer exists. I can handle it better though, so will post a patch shortly.

That did the trick. I got rid of the default symphony "notes" section without deleting the corresponding datasource.

Maybe a simple reminder or notice should do. Thanks for the help.

Hi Brendo.

I got the same error as @ecko until I deleted redundant data sources. A good bit of tidying up.

That solved, I now get this error when I ad a Union DS to a page and open the page in a browser:

Fatal error: Class 'SectionManager' not found in /var/www/vhosts/djbvisas.com/httpdocs/extensions/uniondatasource/data-sources/datasource.union.php on line 449

Any ideas?

Similar to @stuartgpalmer, after upgrading to 2.3.1 and Union DS 1.0.3 and deleting and recreating my union data sources from scratch, I'm getting this error:

PHP Fatal error:  Class 'SectionManager' not found in /srv/www/dev.briandrum.net/public_html/extensions/uniondatasource/data-sources/datasource.union.php on line 459"

Any guidance would be greatly appreciated.

Top of that file needs a require_once TOOLKIT . '/class.sectionmanager.php';. I'll push a commit ASAP

Hi Brendo,

Just installed this one, but I get the error: Symphony Fatal Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY id desc' at line 16

SELECT SQL_CACHE SQL_CALC_FOUND_ROWS `e`.id as id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = 7 UNION DISTINCT SELECT `e`.id as id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = 7 UNION DISTINCT SELECT `e`.id as id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date` FROM `sym_entries` AS `e` WHERE `e`.`section_id` = 7ORDER BY id desc

I hope this is something simple. The extension fit's my needs exactly :). (is there a space missing at the end of the query maybe?

EDIT: To test this I have added a space to line 586 in datasource.union.php. This continues the page, the results seem correct now.

Can you submit a pull request to the integration branch please? Thanks!

Ok, I will asap!

@brendo - Union datasource installs with 2.3.3 ok, but when you try to create a Union Datasource from existing datasources, you get a similar error the one in comment #96 in this thread. Anyway, all that I know is that I installed your integration branch of the Union Datasource, and that fixed the problem. Actually, it seems that the integration branch seems to be working well with Symphony 2.3.3. Is the integration branch as it is ready to be merged over to the master branch?

I've also posted this in the Github Issues for Union Datasource.

got an sql error while using uion datasource.

corrected datasource.union.php line 681:

// Add the ORDER BY clause
        $sql = $sql . ' ' .  $this->data['sort'][0];

addecd the space will solve the problem!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details