Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

fatal error with Cleanup 1.0

edited September 2006 in Vanilla 1.0 Help
Hello,

I just installed vanilla 1 pre release from the svn repository (revision 445 I think), on a linux server (centos4) with apache 2.0.52, php 5.0.4 and mysql 4.1.18.

When I try to delete a user (clean-up user) I get this error message:

Notice: Undefined index: Clipping in .../htdocs/library/Framework/Framework.Functions.php on line 424

Notice: Undefined index: Clipping in .../htdocs/library/Framework/Framework.Class.SqlBuilder.php on line 242
A fatal, non-recoverable error has occurred
Technical information (for support personel):

Error Message
An error occurred while attempting to remove user clippings.
Affected Elements
CleanupForm.Constructor();

The error occurred on or near: 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 'in (3)' at line 1

Comments

  • Hm. I'm not 100% sure the cleanup extension has been converted for v1 use (i know it was in the svn but that doesnt necessarily mean it has). I'm gonna guess since it's not on the addons dir that it hasnt which seems the most likely issue.

    If it is infact alright with v1, I'd assume its a mysql version issue, but i'm pretty sure v4.x is the standard mysql ver at the moment...?
  • Have you tried running the cleanup with the clipboard extension turned off?
  • edited June 2006
    Come to think of it, this is happening because the cleanup extension is still written as though clippings are part of the core. Open up your cleanup/default.php file and scroll down to where you see: // Wipe out clippings then delete the block of text just below that (5 lines or so) and you should be golden. I wonder how it'd be possible to make the cleanup extension work cleaning up extensions which used database tables..hmm... Perhaps each extension which uses tables needs a cleanup function which will wipe out data associated with the user it's given?
  • edited June 2006
    I just edit Cleanup/default.php:

    // Wipe out clippings
    // $s->Clear();
    // $s->SetMainTable('Clipping', 'c');
    // $s->AddWhere('c', 'UserID', '', '('.implode(',',$InactiveUsers).')', 'in', 'and', '', 0);
    // $this->Context->Database->Delete($s, $this->Name, 'Constructor', 'An error occurred while attempting to remove user clippings.');


    Now, when I try to delete a user (clean-up user) I get this error message:
    "Fatal error: Call to undefined method SqlBuilder::AddUpdateWhere() in .../htdocs/extensions/Cleanup/default.php on line 106"

    For info, the line 106 is the one between the strong tags:
    // Update any styles associated with this user to be system styles
    $s->Clear();
    $s->SetMainTable('Style', 's');
    $s->AddFieldNameValue('AuthUserID', '0');
    $s->AddUpdateWhere('s', 'AuthUserID', '', '('.implode(',',$InactiveUsers).')', 'in', 'and', '', 0);
    $this->Context->Database->Update($s, $this->Name, 'Constructor', 'An error occurred while attempting to remove user style relations.');
  • Now you lost me... :)
  • edited June 2006
    Mistake or AddUpdateWhere() have been remove from Framework.Class.SqlBuilder.php in version 1, but still used in Cleanup?
  • edited June 2006
    I replaced line 106:
    $s->AddUpdateWhere('s', 'AuthUserID', '', '('.implode(',',$InactiveUsers).')', 'in', 'and', '', 0);
    by
    $s->AddWhere('s', 'AuthUserID', '', '('.implode(',',$InactiveUsers).')', 'in', 'and', '', 0);

    And it works I think
  • edited June 2006
    Last problem:
    When I tried to create a back-up with cleanup, I got that message:

    Warning: readfile(.../htdocs/images/2006-06-11-20-35-vanillaHFME.sql) [function.readfile]: failed to open stream: No such file or directory in .../htdocs/library/Framework/Framework.Functions.php on line 565

    Warning: unlink(.../htdocs/images/2006-06-11-20-35-vanillaHFME.sql) [function.unlink]: No such file or directory in .../htdocs/library/Framework/Framework.Functions.php on line 566


    I just had to create images/ with the right permissions
  • does it work now ??? Can you set the complete code in the add-ons dir ?
  • Mark doesn't support it anymore. Someone can get the code from him (or from the svn) and support it for him. I think we where all agreed that Jazzman should do that ;-)
  • Yes ;) Jazzzman would do it very well! :) or you... =)
This discussion has been closed.