wiki:faq/support/red-fix-hard-error

Version 2 (modified by Ross, 12 years ago) ( diff )

--

How do I fix a hard error in the control panel (red)?

Sometimes when things happen in the control panel that were un-anticipated, red will change the status of an item to either hard-error or soft-error. A soft-error can be fixed by the user by either editing the record or deleting it. These errors are not considered serious or are errors that we think happened due to fixable user error.

A hard-error, on the other hand, is set when something happens that is considered either a security problem or a problem that most likely cannot be fixed by changing the user input.

Right now there is no way to recover from a hard-error via the user interface.

To recover:

  • Login to hay.mayfirst.org as root
  • Run mysql:
    mysql seso
    
  • Determine the item_id of the record in question (it is embedded in the edit and delete link of the item)
  • Determine if you want the status to be changed to pending-insert, pending-delete, pending-update or pending-restore (pending restore is like pending-insert but it won't throw an error if the record has already been created on the server - in that case it will operate like pending-update). You can also set it to "deleted" - but that is discouraged unless you are sure all the actions to delete the item have been taken on the target server (node). If set to delete, it will simply be ignored by red, whereas pending-delete will cause the server node to take the steps required to properly delete the item before setting the status to deleted.
  • execute the sql statement:
    UPDATE red_item SET item_status = 'WHATEVER-STATUS-YOU-WANT' WHERE item_id = ID;
    
  • Unless you set the status to deleted, you will next need to login to the server node in question and run:
    /usr/local/share/red/node/sbin/red-node-update
    
Note: See TracWiki for help on using the wiki.