Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a track to a playlist via drag & drop does not work #381

Closed
RST-J opened this issue Feb 27, 2019 · 9 comments
Closed

Adding a track to a playlist via drag & drop does not work #381

RST-J opened this issue Feb 27, 2019 · 9 comments
Labels
Milestone

Comments

@RST-J
Copy link

RST-J commented Feb 27, 2019

When drag&dropping a track on a playlist the server crashes because of an invalid SQL-Query which refers to an id-column which does not exist in oc_audioplayer_playlist_tracks join table.

(As you'll see I have an ancient setup, so I'd not be surprised if something does not work. But to me it looks like that this is not the cause of the error.)

Expected behavior

Dragging a track from an album and dropping it on a playlist adds the track to the playlist

Actual behavior

Dragging the track is possible, hovering the playlist changes its background color but dropping the file then does not add it to the playlist. I checked it by viewing the playlist afterwards, it is not only the count which is not increased.

Steps to reproduce the behavior

  1. Open an album
  2. Drag a track to a playlist
  3. Drop the track on the playlist

Server configuration

Operating system:
Debian wheezy (yes, I know)

Web server:
Apache/2.2.22, PHP 5.6.40

Database:
mysql 5.5

ownCloud version:
10.1.0.4

Audio Player version:
2.6.0

Are you using external storage? If yes, which one: No

Client configuration

Operating system:
Kubuntu 18.10

Browser:
Firefox 65.0.1

Logs

Nextcloud/ownCloud log

Nextcloud/ownCloud log (`/data/[nextcloud|owncloud].log`)
{
    "app": "index",
    "level": 3,
    "message": "Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\InvalidFieldNameException\",\"Message\":\"An exception occurred while executing 'SELECT `id` FROM `oc_audioplayer_playlist_tracks` WHERE `playlist_id` = ? AND `track_id` = ?' with params [\\\"1\\\", \\\"545\\\"]:\\n\\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list'\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Statement.php(178): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT `id` FRO...', Array)\\n#2 \\/var\\/www\\/some_directory\\/owncloud\\/apps\\/audioplayer\\/lib\\/Controller\\/PlaylistController.php(132): Doctrine\\\\DBAL\\\\Statement->execute(Array)\\n#3 [internal function]: OCA\\\\audioplayer\\\\Controller\\\\PlaylistController->addTrackToPlaylist('1', '545', 'NaN')\\n#4 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(153): call_user_func_array(Array, Array)\\n#5 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(85): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\audioplayer\\\\Controller\\\\PlaylistController), 'addTrackToPlayl...')\\n#6 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/private\\/AppFramework\\/App.php(100): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\audioplayer\\\\Controller\\\\PlaylistController), 'addTrackToPlayl...')\\n#7 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('PlaylistControl...', 'addTrackToPlayl...', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#8 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#9 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/private\\/Route\\/Router.php(342): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#10 \\/var\\/www\\/some_directory\\/owncloud\\/lib\\/base.php(909): OC\\\\Route\\\\Router->match('\\/apps\\/audioplay...')\\n#11 \\/var\\/www\\/some_directory\\/owncloud\\/index.php(54): OC::handleRequest()\\n#12 {main}\",\"File\":\"\\/var\\/www\\/some_directory\\/owncloud\\/lib\\/composer\\/doctrine\\/dbal\\/lib\\/Doctrine\\/DBAL\\/Driver\\/AbstractMySQLDriver.php\",\"Line\":71}",
    "method": "GET",
    "remoteAddr": "abc.def.ghi.jkl",
    "reqId": "some_id",
    "time": "2019-02-27T21:43:00+00:00",
    "url": "/owncloud/index.php/apps/audioplayer/addtracktoplaylist?playlistid=1&songid=545&sorting=NaN",
    "user": "user"
}

Web server error log (optional)

Web server error log
abc.def.ghi.jkl - - [27/Feb/2019:23:00:52 +0100] "GET /owncloud/index.php/apps/audioplayer/addtracktoplaylist?playlistid=1&songid=545&sorting=NaN HTTP/1.1" 500 2778 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
r4sas added a commit to r4sas/audioplayer that referenced this issue Feb 28, 2019
@r4sas
Copy link
Contributor

r4sas commented Feb 28, 2019

Thank you for reporting. I've created PR #382 to fix this issue.

@Rello Rello added this to the 2.6.1 milestone Mar 1, 2019
@Rello Rello closed this as completed in dba7925 Mar 1, 2019
@Rello Rello reopened this Mar 1, 2019
@r4sas
Copy link
Contributor

r4sas commented Mar 1, 2019

@Rello I found one more bug with playlists: deletion button not works for playlist, moving also. idk if it happens atfer upgrading NC to 15.0.5.

@Rello
Copy link
Owner

Rello commented Mar 1, 2019

let me test. i have both available

@r4sas
Copy link
Contributor

r4sas commented Mar 1, 2019

Sorting works after droping cache. Delete button still not works.

add: playlist rename button create field for that, but it looks like read-only.

@Rello
Copy link
Owner

Rello commented Mar 1, 2019

15.0.4:

  • moving/sorting inside playlist
  • removing single track in playlist
  • deleting playlist

@r4sas
Copy link
Contributor

r4sas commented Mar 1, 2019

add: playlist rename button create field for that, but it looks like read-only.

Can we add playlist reloading after deleting track?

@Rello
Copy link
Owner

Rello commented Mar 1, 2019

is seems NC changed something in the dialog handling (popup for playlist deletion). checking...

@Rello
Copy link
Owner

Rello commented Mar 3, 2019

switched from jquery-dialog to OC.dialog...

Rello added a commit that referenced this issue Mar 3, 2019
@r4sas
Copy link
Contributor

r4sas commented Mar 3, 2019

Works now.

@Rello Rello removed the testing label Mar 10, 2019
@Rello Rello closed this as completed Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants