No valid database connection

Alonzo
Alonzo
Offline
0
Okay...
it seems as though this hasn't been completely answered but...
I am using the JomSocial app. to add My Albums to a profile... but when I get to the
component on the front-end, at the top it says...

No valid database connection 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 'ORDER BY letter,class_name' at line 1 SQL=SELECT id,artist_name FROM jos_muscol_artists WHERE id != 0 AND user_id = ORDER BY letter,class_name

Im not sure exactly what this means, and I looked at the other forum posts and haven't found an answer....

Im using Music Collection 2.1.0 pro
and Joomla 1.5.22
and JomSocial 2.0.2

Thanks
Responses (53)
  • Accepted Answer

    Friday, December 03 2010, 04:38 PM - #Permalink
    0
    I see..

    hmm is this at the jomsocial page?
    can you post a link? that would be very useful...
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Tuesday, December 07 2010, 10:33 PM - #Permalink
    0
    Sorry
    I've the same error
    My link page is:
    http://www.ddsound.com/index.php?option=com_muscol&view=playlist&id=0&Itemid=69&lang=it

    But this site is at the moment closed with key password's acces.
    Can i contact for give you private access?

    Answer me to my email please.
    Fabio
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, December 08 2010, 04:03 PM - #Permalink
    0
    hello Fabio,
    details at joomlamusicsolutions@gmail.com
    The reply is currently minimized Show
  • Accepted Answer

    Alonzo
    Alonzo
    Offline
    Thursday, December 09 2010, 11:33 PM - #Permalink
    0
    Hey here is the link... I kind of threw it up real quick so you can see, sorry it took so long
    but can you help with this...
    it seems to be on the new artist register page in the music collection system as well as jomsocial add new artist... its the same message though
    oh yea and this site is currently closed...
    I can give it to you via my email @ zodiggsz@gmail.com
    thank you so much

    http://mymusicpromo.com/index.php?option=com_muscol&view=artist&layout=form&Itemid=94&lang=en
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 10 2010, 12:16 PM - #Permalink
    0
    yes send me your access data please.. otherwise I can't do much! ;)
    The reply is currently minimized Show
  • Accepted Answer

    Alonzo
    Alonzo
    Offline
    Friday, December 10 2010, 01:21 PM - #Permalink
    0
    I'll make it live so you can check it out


    mymusicpromo.com/index.php?option=com_mu...temid=94&lang=en
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Friday, December 10 2010, 09:24 PM - #Permalink
    0
    Hi Germi
    I've sent you the acces key.
    Have you received it?

    Bye
    F
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, December 11 2010, 12:47 PM - #Permalink
    0
    yes! already answered you by mail: the problem is that you were trying to save a plylist without items in it! I just added some items, and then saved the playlist, and there was no problem!
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Sunday, December 12 2010, 08:28 PM - #Permalink
    0
    Hi Germi

    Sorry but the problem display the error without any interaction with to the playlist but as soon as you open the page!

    So please see better!
    Bye
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Wednesday, December 15 2010, 08:47 PM - #Permalink
    0
    Hi Germi
    I've see your playlist on my website but..
    I've the same problem in pages without any song loaded.

    If I not insert song on playlist the error is showed otherwise it's go out.
    Can you help me please to remove it in any way?

    I hope see you soon on my webstie.
    Bye
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 16 2010, 04:19 AM - #Permalink
    0
    i think i have the same problem here.. no idea what is going on..

    http://atunesonline.com/index.php?option=com_content&view=article&id=19&Itemid=27&lang=en



    and i also get this after i comment on an artist page:

    500 - No valid database connection:Unknown column 'artist_name' in 'field list' SQL=SELECT artist_name AS name,user_id FROM jos_muscol_albums WHERE id = 8

    You may not be able to visit this page because of:

    1. an out-of-date bookmark/favourite
    2. a search engine that has an out-of-date listing for this site
    3. a mistyped address
    4. you have no access to this page
    5. The requested resource was not found.
    6. An error has occurred while processing your request.

    Please try one of the following pages:

    * Home Page

    If difficulties persist, please contact the System Administrator of this site.

    No valid database connection:Unknown column 'artist_name' in 'field list' SQL=SELECT artist_name AS name,user_id FROM jos_muscol_albums WHERE id = 8
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 17 2010, 06:17 PM - #Permalink
    0
    arggg SORRY

    we just discovered this error!!!!

    it's a small bug. very easy to solve. we will publish an update very soon! however, if you want, you can solve it yourself:

    open /components/com_muscol/controller.php and go to line 365

    where it says #__muscol_albums it should say #__muscol_artists

    SORRY ABOUT THAT!!!
    The reply is currently minimized Show
  • Accepted Answer

    Friday, December 17 2010, 06:22 PM - #Permalink
    0
    thanks for the solution...love your product.
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Sunday, December 19 2010, 09:43 PM - #Permalink
    0
    Hi Germy

    Sorry but I've change the line 356 and not the 365 because in 365 not there is the "#__muscol_artists" label.

    This is what now there is:
    $query = ' SELECT artist_name AS name,user_id FROM #__muscol_artists WHERE id = ' .$album_id ;

    In my 356 line i see what you mean I hope.
    But the error message don't go out!!

    Please help again!
    Bye
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 20 2010, 08:11 AM - #Permalink
    0
    this is the link to the error.. when you click on the on-the-go playlist when its empty.

    http://atunesonline.com/index.php?option=com_muscol&view=playlist&id=0&Itemid=54&lang=en
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 20 2010, 04:12 PM - #Permalink
    0
    @fabionefa yes, the changeyou did is the corrent... but the problem should be gone! you still have the problem when you comment an artist?

    @sevenxavier uops!! this looks like an error (the truth is.. "on-the-go" playlist should not be clickable if empty...)
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 20 2010, 04:19 PM - #Permalink
    0
    oooh wow.. i guess i found two errors so far with the application. i should get a discoutn or soemthign. hahha..

    any fix yet on this? please keep me informed.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 20 2010, 04:23 PM - #Permalink
    0
    actually, I'm taking a deeper look into this.. and it's not a bug, actually. the playlist should show up, but just... empty.

    if you see in our site, that's what it does: it opens, but it's empty. it gives no error... and we are using exactly the same version that you have!

    so I'm wondering why are you getting this error... let me look deeper into it.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, December 20 2010, 04:28 PM - #Permalink
    0
    anyway, here's a quick fix: unzip and copy this file into
    /components/com_muscol/views/playlists/tmpl/default.php
    [file name=default-20101220.zip size=1407]http://www.joomlamusicsolutions.com/images/fbfiles/files/default-20101220.zip[/file]

    (it must replace the current one)

    basically, this just skips the LINK if the playlist is empty...
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Tuesday, December 21 2010, 02:57 AM - #Permalink
    0
    I had this error but looking at an artist and showing related items. It seems to be something with the query on related items and related items does have values (it's not empty).

    "No valid database connection 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 '' at line 1 SQL=SELECT related FROM jos_muscol_artists WHERE id ="
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Tuesday, December 21 2010, 03:25 AM - #Permalink
    0
    Interesting thing: I have to give an example for trying to explain what I see is happening from my perspective.

    Let's say we have two artist: A and B. If on A you select B as related and on B you select A as related (on the admin), the error comes out...

    "No valid database connection 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 '' at line 1 SQL=SELECT related FROM jos_muscol_artists WHERE id =".

    If you just select one of them, there should be no problem.

    Another thing is that I run a spanish version site. In spanish we use the accent symbol on some words, that is, á é í ó ú. Maybe the query could have problems with those characters..
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 21 2010, 04:53 PM - #Permalink
    0
    hello

    the problem looks just like "there's no ID" which is pretty weird. it shouldnt have any problems, you select or not A related to B and the other way around

    about chars like á é í ó ú, don't worry, it is not a problem at all. I run a spanish site myself and there are no problems. it is UTF8 compatible. works even with arabic, cyrillic...
    no problems
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Wednesday, December 22 2010, 10:56 PM - #Permalink
    0
    Hi Germi
    No the problem is when you enter in the page where you can manage the playlist but if is empty the error is show!
    Please help or fix it.

    Bye
    Fabio
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, December 23 2010, 12:56 PM - #Permalink
    0
    well... the file I posted should solve this.. (it simply disables acees to the playlist, if empty).. have you tried it?
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Thursday, December 23 2010, 09:31 PM - #Permalink
    0
    Hi Germi
    unfortunately the problem doesn't go away and new problem is come!!
    Please see my web site's pages:
    "Gestisci la tua PLAYLIST" where the problem is showed
    and
    "Problem" where the new error is come... the page is gone !!

    Please help as son as possible.
    Bye
    Fabio
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Wednesday, December 29 2010, 10:26 PM - #Permalink
    0
    Hi Germi
    Where You are ? Are you in holydays? :-) Great!

    The SQL problem remain the same!!

    No valid database connection 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 ')' at line 1 SQL=SELECT s.*,al.name as album_name, al.image, ar.artist_name FROM jos_muscol_songs as s LEFT JOIN jos_muscol_albums as al ON al.id = s.album_id LEFT JOIN jos_muscol_artists as ar ON (ar.id = s.artist_id OR ar.id = al.artist_id) WHERE s.id IN ()


    in the page where ther isn't item in the playlist!!
    Please can you make a fix for this bad problem?

    You have the acces keys for my site...do you remember?

    See you as soon as possible
    fabionefa
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 04 2011, 05:56 PM - #Permalink
    0
    hello Fabio!

    yes, I took some days off... :)

    HAPPY NEW YEAR!!

    let me take care of this. can you please remind me in which page do you get this error? ( I mean, can you just post a link?)
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Tuesday, January 04 2011, 08:16 PM - #Permalink
    0
    Hi Germi

    Happy New Year to you!

    Yes the link is here:
    http://www.ddsound.com/index.php?option=com_muscol&view=playlist&layout=form&Itemid=70&lang=it

    See you soon
    Fabio
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, January 06 2011, 06:07 PM - #Permalink
    0
    hello Fabio,

    can you check if this file solves the issue?
    you must unzip it and replace it for the one existing in /components/com_muscol/models/

    [file name=playlist.zip size=2660]http://www.joomlamusicsolutions.com/images/fbfiles/files/playlist.zip[/file]
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 09 2011, 03:34 AM - #Permalink
    0
    It solved the issue about the playlist being empty.

    However, at the global parameters, there is an option that says "Allow Playlist Storage". It is "Yes". But in fact, nothing is written to the playlist table on the database. Did I missed something?
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 09 2011, 04:39 AM - #Permalink
    0
    OK. The problem seems to happen when you use "playlist" menu item rather than "playlists". In "playlists" seems to be working fine but it's required to hit "Consolidate playlist" option so that it works. It saves the playlist in the database playlist table. The problem seems to happen with the "On-the-go" default playlist your system have. With this one, changes are not saved to the database.

    Also, would like to know the purpose of the "Other playlist" section. Does it have to be that we could create default playlists for users before they use the system?
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Sunday, January 09 2011, 10:12 PM - #Permalink
    0
    Hi Germi

    G R E A T S W O R K S !!

    Work perfect!

    Bye

    P.S.
    The site is now open for beta test!
    See you soon
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Friday, January 21 2011, 02:35 PM - #Permalink
    0
    Hi Germi

    Sorry but the story start to be much long of the expected!!

    The problem with DB connection is solved but a new problem is come:
    500 - Layout "default" not found
    on
    http://www.ddsound.com/index.php?option=com_muscol&view=playlists&Itemid=76&lang=it
    When you choose the item menu
    "PlayList Form Aspetto" You receive the "500 - Layout "default" not found" error

    It is a playlists type item menu

    Help me early please
    I've sent an email last week from Custom service but you have not answer me!
    I'm waiting for you!
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 21 2011, 03:43 PM - #Permalink
    0
    hello!

    well, that sounds strange... it's like you have some file missing...

    can you check that the file /components/com_muscol/views/playlists/tmpl/default.php exists on your site?

    try to re-upload it again...:S
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Friday, January 21 2011, 04:02 PM - #Permalink
    0
    Hi Germi
    Thankyou for your fast answer!

    Tha file not there is...better...there is but it's _default.php.

    Rename without " _ " before name or re-upload a new version?

    Thanks
    Bye
    F
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 21 2011, 04:05 PM - #Permalink
    0
    yes... that is the problem.

    try just to rename it. this is strange... I mean.. at some point, this file got renamed? maybe your server has some "rule" that "if X happens, rename the file to _filename"

    maybe that's the cause... I cannot thing in enything else.

    in general, when you receive a "500 layout not found" is precisely that: the file is missing in the tmpl/ folder... so all you need to do is "restore" it...

    what I dont know is the reason why this file is missing... (in your case, why it has been renamed)
    The reply is currently minimized Show
  • Accepted Answer

    Fabio
    Fabio
    Offline
    Friday, January 21 2011, 04:53 PM - #Permalink
    0
    OK
    No problem

    Now all seems to be work properly

    Thank you a lot
    Bye
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Thursday, January 27 2011, 03:48 AM - #Permalink
    0
    I am having an error when I try to add artist as a user (index.php?option=com_muscol&view=artist&layout=form&Itemid=325)

    No valid database connection: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 'ORDER BY letter,class_name' at line 1 SQL=SELECT id,artist_name FROM jos_muscol_artists WHERE id != 0 AND user_id = ORDER BY letter,class_name

    germi, could you help me?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 28 2011, 06:06 AM - #Permalink
    0
    this error looks like you're not logged in... hmm... are you trying to add the artist without being logged in?
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Saturday, January 29 2011, 02:16 AM - #Permalink
    0
    No. The user is logged in.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, January 29 2011, 04:12 AM - #Permalink
    0
    this is strange... please post a link to the site, and also give me access data please
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 30 2011, 02:02 AM - #Permalink
    0
    The problem seems to be related with the "Frontend users can only add albums by artists they created" at the main parameters.

    This option says that "if set to yes, only frontend users can only add albums by artists they created. Elsewere, they can add albums on every artists on the collection."

    Well, if I select "yes", the problem appears. If I select "no", as it is by default, the problem is solved.

    But, I need this option to be "yes" as my users will add their own artists and their own albums. I don't want users to use or see the existing artists created from other users on the database.

    If I select "yes" at this option, then a new user that have not created any artists yet, could not add neither an album nor an artist.

    So, it seems to me that the system is not permitting new users (users who haven't added any artists yet) to add artists when the above option is "yes".
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 30 2011, 02:59 AM - #Permalink
    0
    I have noticed also that the system does not permit to add more than one artist per user when having this configuration..

    Global Params:
    Frontend users can add artists -> Yes
    Frontend users can only add albums by artists they created -> Yes

    Menu Item Params:
    Frontend users can add artists -> Use Global
    Frontend users can only add albums by artists they created -> Use Global

    And the following configuration does not permit to add more than one artist too...

    Global Params:
    Frontend users can add artists -> Yes
    Frontend users can only add albums by artists they created -> No

    Menu Item Params:
    Frontend users can add artists -> Use Global
    Frontend users can only add albums by artists they created -> Use Global
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 30 2011, 03:01 AM - #Permalink
    0
    that does not make much sense to me... :S parameters are not handled by Music Collection, but by Joomla iself (it's joomla who overrides the global parameters with the Menu Item parameters if necessary, and returns the result to Music Collection...)

    this seems really strange to me... there should be NO restriction in adding more than 1 artist... :S
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 30 2011, 03:04 AM - #Permalink
    0
    The other configuration that is possible, but that does not make any sense is..

    Global Params:
    Frontend users can add artists -> No
    Frontend users can only add albums by artists they created -> No

    Menu Item Params:
    Frontend users can add artists -> Use Global
    Frontend users can only add albums by artists they created -> Use Global

    This config should not permit to add an artist.
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 30 2011, 03:14 AM - #Permalink
    0
    Ok. Here is a temp account for you...

    http://www.vibrafeliz.com

    user...
    pass...

    when you login, go to user menu at left and hit "Anadir Artista". Try to add more than one artist.

    The config now is set to:

    Global Params:
    Frontend users can add artists -> Yes
    Frontend users can only add albums by artists they created -> Yes

    Menu Item Params:
    Frontend users can add artists -> Use Global
    Frontend users can only add albums by artists they created -> Use Global
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 30 2011, 07:05 AM - #Permalink
    0
    this URL gives an error... :S (no database connection)... please try...
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Sunday, January 30 2011, 03:00 PM - #Permalink
    0
    The url is valid. It works. Try again. When you login and try to add more than one artists through the option "Anadir Artista", the following error comes out.

    "500 - No valid database connection: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 'ORDER BY letter,class_name' at line 1 SQL=SELECT id,artist_name FROM jos_muscol_artists WHERE id != 0 AND user_id = ORDER BY letter,class_name"
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Monday, January 31 2011, 08:53 PM - #Permalink
    0
    OK Germi,

    I solved my problem just commenting out the line where the database loads at the getArtistsData function on components/com_muscol/models/artist.php... I don't know if this will give me more troubles in the future, but what I know is that it just solved my problem. Something should be wrong in that function as the system seems to have an empty array ($this->_artists_data) when we have one artist on the db. When I did comment the line, I could add more artists without problems.

    function getArtistsData()
    {
    // Lets load the data if it doesn't already exist
    if (empty( $this->_artists_data )){

    $params = &JComponentHelper::getParams( 'com_muscol' );
    $user =& JFactory::getUser();

    if($params->get('add_albums_own_artists')) $where = ' WHERE id != '.$this->_id.' AND user_id = ' . $user_id ;
    else $where = ' WHERE id != '.$this->_id ;

    $query = ' SELECT id,artist_name FROM #__muscol_artists '.
    $where .
    ' ORDER BY letter,class_name';
    $this->_db->setQuery( $query );
    //$this->_artists_data = $this->_db->loadObjectList();
    }

    return $this->_artists_data;

    }
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, February 01 2011, 06:01 AM - #Permalink
    0
    I see.. :S :S it's strange, though... I think this shouldn't give any error at all...

    good think you know some coding and you finded this out!

    good job man :)
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Saturday, February 12 2011, 02:51 AM - #Permalink
    0
    Once again, having a problem with this module (adding an artist). But this time what is new on my site is that I did installed sh404sef. Also, I already installed the last sh404sef music collection plugin (ver.2.1.0).

    Everything in Music Collection is working fine with sh404sef on my site except again, the "add artist" and "add albums" section. I feel is something that have to do with the "layout=form" URL parameter.

    The error that comes out is...

    "500 No valid database connection: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 '' at line 3 SQL=SELECT letter,artist_name FROM jos_muscol_artists WHERE id ="

    When sh404sef is disabled the "add artist" and "add album" sections are working good. But when enabled, the above error comes out. I tried to assign the same URL address to the sef url...

    URL: index.php?option=com_muscol&view=artist&layout=form&Itemid=325&lang=es
    SEF URL: add-artist.html

    but the sh404sef complained about "Flooding" (a security feature). After that, I disabled flooding protection but with the same results.

    Then, I tried another thing.. assigned to the SEF URL the following sintax that triggered the same error too..

    /component/option,com_muscol/Itemid,325/view,artist/layout,form/lang,es

    If I eliminate the layout,form parameter from the above address, then the page displays good (but not in the form layout that I need). And, when I include it, BAM! the error comes out..

    What is going on with this layout=form parameter? How can you fix this? Is something I have to do with sh404sef SEF URL's?
    The reply is currently minimized Show
  • Accepted Answer

    jorge
    jorge
    Offline
    Saturday, February 12 2011, 03:19 AM - #Permalink
    0
    Interesting thing!

    It seems that I just solved the problem. I removed the file of your sh404sef plugin on "components/com_sh404sef/sef_ext/com_muscol.php" and the problem was gone. Everything is working beautiful now.

    I feel your sh404sef extension is outdated. In fact, it seems to me that your plugin is not even required at all when running the latest version of sh404sef. Anybody tell me if you feel I'm wrong.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, February 12 2011, 05:24 AM - #Permalink
    0
    :S you may be right.... damn..

    this plugin has not been updated for some time. however, seeing what you are saying, it is possible that new versions of sh404SEF do not require the plugin anymore... I'll look into it...

    thanks
    The reply is currently minimized Show
Your Reply