Jump to content

Error with selector


Harmster
 Share

Recommended Posts

Hey,

I got this error today and I dont even know what it means:

Error: Exception: Not unique table/alias: 'field_summoner_id' (in /home/content/12/11206812/html/wire/core/Database.php line 118)

#0 /home/content/12/11206812/html/wire/core/DatabaseQuery.php(84): Database->query(Object(DatabaseQuerySelect))
#1 /home/content/12/11206812/html/wire/core/PageFinder.php(148): DatabaseQuery->execute()
#2 /home/content/12/11206812/html/wire/core/Pages.php(144): PageFinder->find(Object(Selectors), Array)
#3 [internal function]: Pages->___find('template=match|...')
#4 /home/content/12/11206812/html/wire/core/Wire.php(271): call_user_func_array(Array, Array)
#5 /home/content/12/11206812/html/wire/core/Wire.php(229): Wire->runHooks('find', Array)
#6 /home/content/12/11206812/html/site/templates/feed.php(23): Wire->__call('find', Array)
#7 /home/content/12/11206812/html/site/templates/feed.php(23): Pages->find('template=match|...')
#8 /home/content/12/11206812/html/site/templates/home.php(10): require_once('/home/content/1...')
#9 /home/content/12/11206812/html/wire/core/TemplateFile.php(125)

This error message was shown because you are logged in as a Superuser. Error has been logged.

I get this error because of this selector:

$items = $pages->find("template=match|notification, summoner_id=$summoner_string, sort=-create_date, limit=15");

(The summoner_string contains IN THIS CASE: |24604493|27565345|22443070|442232|20293661|36868417|19315465|30962047|37560273|27475320|27565345 

)

Now what happens is when I log into a user that has this $summoner_string:27565345|27475320 it does not happen... Though, this user isnt retrieving notification templates. 

Both templates contain the create_date and summoner_id fields

Please help?

Link to comment
Share on other sites

It seems to have something to do with the pipe character '|' in the beginning of the string. Based on a very quick test I'd say pipe isn't interpreted correctly as a first character of the value - except for native fields (id, name and so on).

To solve the problem try and make sure there are pipes only in between of the values in the string.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...