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

OC 5.0.8: Bookmarks edit doesn't work anymore... #31

Closed
gishi opened this issue Jul 14, 2013 · 10 comments
Closed

OC 5.0.8: Bookmarks edit doesn't work anymore... #31

gishi opened this issue Jul 14, 2013 · 10 comments

Comments

@gishi
Copy link

gishi commented Jul 14, 2013

Since the update, I can't edit bookmarks anymore.

When I try to save modifications and tagg bookmarks (click on save button), nothing happens.

I found this error in apache2 error.log

PHP Fatal error: Call to a member function numRows() on a non-object in /var/www/owncloud/apps/bookmarks/lib/bookmarks.php on line 299

@dgoo2308
Copy link

Same problem here and also in 5.0.9, using pgsql

my temporary solution, comment out "if ($result->numRows() == 0) exit();" in function editbookmarks of ..../owncloud/apps/bookmarks/lib/bookmarks.php
should then look like this:
.....
$result = $query->execute($params);

            // Abort the operation if bookmark couldn't be set
    // (probably because the user is not allowed to edit this bookmark
    // if ($result->numRows() == 0) exit();

@flattman
Copy link

You have to change the line to:

if ($result == 0) exit();

because the OCP\DB->execute (in 5.0.9) method returns the number (int) of affected rows if an manipulation statement (Update) was executed.

System: owncloud 5.0.9 width PDO mysql

@gishi
Copy link
Author

gishi commented Jul 18, 2013

Thanks flattman, it works fine now.

I hope the code will be updated soon, casual users doesn't take time to repair the code of applications ;)

Thanks a lot ;)

@dgoo2308
Copy link

tested the solution
"if ($result == 0) exit();"
too, works fine.
How can we get the code to be updated?

Thanks

@juk0de
Copy link

juk0de commented Oct 16, 2013

The problem still exists in OC 5.0.11 and 5.0.12 (FF 24.0, PHP 5.3.10-1ubuntu3.8). Editing bookmarks is not possible and the "Call to a member function numRows() on a non-object" error is still happening!

Maybe the bookmark app has not been updated correctly (installed version is 3.0)? How can I check this? I only found "core update" lines in the logfile...

@juk0de
Copy link

juk0de commented Oct 28, 2013

Since nobody responded, I've checked for differences between the installed "apps/bookmarks" folder and that from the latest archive. They are identical! Then I've checked the code (in both the installation and latest archive) and it does not contain the fix from above. The line still reads:

if ($result->numRows() == 0) exit();

So, it seems that this bug has not been fixed, although it has been closed 3 months ago! How could this happen?

@karlitschek
Copy link
Member

@minimeee Could be mistake.
@eMerzh Can you have a look? :-)

@eMerzh
Copy link
Contributor

eMerzh commented Oct 29, 2013

@karlitschek mmh yes ... seems that it's not available in the tgz although it's committed also on the stable5 branch.
should i do smth else?

@karlitschek
Copy link
Member

@eMerzh Hmmm. Strange. We still use the stable5 branch from the apps repo. Is it there too?

@eMerzh
Copy link
Contributor

eMerzh commented Oct 29, 2013

oh shit no .... i'll try to commit it there too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants