Cannot modify an existing policy

Issue #13 resolved
Marcel Evenson created an issue

When using the web interface when you go to modify an existing policy you just get the error: Cannot modify existing policy -> Failed to update

This error is present in both my local install and the demo on http://demo.clapf.org/.

Comments (7)

  1. Marcel Evenson reporter

    Also note that when looking at the database queries generated by the clapf web interface I've noticed queries to tables that don't actually exist in the clapf database. I'm not sure if this is because of the conversion from Piler or if PHP constants are missing and not getting replaced properly.

    Some examples:

    SELECT domain FROM TABLE_DOMAIN_USER WHERE uid='1'
    SELECT gid FROM email_groups WHERE uid='1'
    DELETE FROM `TABLE_DOMAIN_USER` WHERE uid='1'
    
  2. Janos SUTO repo owner

    Can you describe what you tried to update? I've just managed to fix a few parameters in the test policy, and couldn't see any problem.

    The TABLE_DOMAIN_USER part is some stale functions in model/user/user.php. I ripped another project (of mine) to get a nice looking new gui, and some unused stuff is still included. Those few functions shouldn't cause any problems. I'll remove them later.

  3. Marcel Evenson reporter

    Login to the demo at : http://demo.clapf.org/

    user: admin@local pass: clapfrocks

    Try to edit any of the policies: You get the error: Failed to update

    I get this same error when trying to update any policy on my local install. Administration -> policy -> edit/View -> click modify

  4. Janos SUTO repo owner

    OK, I get it. The script checks for the updated rows, and if you actually don't change a thing, then 0 row is updated, which is resulted as a failure.

  5. Log in to comment