• Resolved Dan Kobler

    (@dankobler)


    I am no longer able to use the “approve” functionality or even edit entries to be able to have them displayed on the front end at the page above. When I click on the edit link in the WP backend, I get a not found error. The URL looks to be screwed up: https://affordablebaysolutions.org/wp-admin/undefined&screen_mode=edit

    I’m guessing the “undefined” part of the URL should be the post type or something?

    Any help would be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • I also have the same issue – approval does not seem to work (no approve column appears in the entries screen).

    • This reply was modified 6 years, 11 months ago by caordawebsol.

    This functionality was broken a little over a year ago.

    A work-around fix for it is available thanks to @guillaumesfi.

    When you introduce the “Approved” field in the form, it comes in with “Approved? (Admin-Only)” as its field name. After the field is populated in this manner, edit it and change the field name to “Approved”.

    This change restored the functionality for me today.

    @dankobler, before I discovered the fix I just entered, I found the same bug with trying to edit the entry to set the Approved field in a clunky manner.

    I found that you could still View, and once you are there, the Edit button therein would allow you to edit the entry, including the Approved field.

    Last year, this was how we ended up setting the approval!

    Thread Starter Dan Kobler

    (@dankobler)

    Fantastic! I was just about to give up on this, but this worked great!

    Thanks 1,000,000 @pvraman and @guillaumesfi!!!

    I now have the approve column showing up but it’s not working – unapproved and approved listings both show up. Any ideas??

    @caordawebsol, I see this behavior as well. I need to check and see if I can spot something.

    Anyone else with an idea?

    It seems to me that there is a bug in the code. I am not sure about the fix for it. It is best to appeal to @katzwebdesign to provide it.

    The following code snippet in edit-form.php is an ill-formed PHP code (function has only case clauses with missing switch statement). From the looks of the details, I think the code is intended to work without changing the field name as we talked about earlier.

    I am not even sure that this is the cause of the problem.

    Zack?

    Thanks.
    Venkat

    The code snippet in edit-form.php:
    public function directory_add_default_values() {
    ?>
    case “entrylink” :
    field.label = “<?php echo esc_js( __(“Go to Entry”, “gravity-forms-addons”) ); ?>”;
    field.adminOnly = true;
    field.choices = null;
    field.inputs = null;
    field.hideInSingle = true;
    field.useAsEntryLink = ‘label’;
    field.type = ‘hidden’;
    field.disableMargins = true;

    break;

    case ‘usereditlink’:
    field.label = “<?php echo esc_js( __(“Edit”, “gravity-forms-addons”) ); ?>”;

    field.adminOnly = true;
    field.choices = null;
    field.inputs = null;
    field.hideInSingle = false;
    field.useAsEntryLink = false;
    field.type = ‘hidden’;
    field.disableMargins = 2;

    break;

    case ‘directoryapproved’:
    field.label = “<?php echo esc_js( __(“Approved? (Admin-only)”, “gravity-forms-addons”)); ?>”;

    field.adminLabel = “<?php echo esc_js( __(“Approved?”, “gravity-forms-addons”)); ?>”;
    field.adminOnly = true;

    field.choices = null;
    field.inputs = null;

    if(!field.choices)
    field.choices = new Array(new Choice(“<?php echo esc_js( __(“Approved”, “gravity-forms-addons”)); ?>”));

    field.inputs = new Array();
    for(var i=1; i<=field.choices.length; i++)
    field.inputs.push(new Input(field.id + (i/10), field.choices[i-1].text));

    field.hideInDirectory = true;
    field.hideInSingle = true;
    field.type = ‘checkbox’;

    break;
    <?php
    }

    Its weird I get an over write of my data field “website” with the word Approved

    @karmicbliss, can you provide a couple of details? I am understanding the issue a little and before I say more I want to confirm my suspicion in your case.

    Did you apply the workaround and is the approval toggle working for you in the entries list page?

    Can you tell me the field-id of the ‘website’ field (where the word Approved appears)?

    Can you also visit the entries page for the form, and save the link for the column header that sorts the list based on approved status? For me, it looks like:

    https://<site root>/wp-admin/admin.php?page=gf_entries&sort=41

    I will respond after I get these details.

    I think there is a bug that is a little hard to fix by ourselves. But there is a workaround that hopefully would work for everyone.

    @pvraman:

    I have experienced the same issue as @karmicbliss so I can supply the request details.

    I applied the workaround as detailed and it fixed the issue with approvals (showed the approval column in the Entries view and worked correctly with showing/hiding stuff).

    The Approved field ID is 11, the “Suburb” field ID (the one I see “Approved” in) is 10.

    /wp-admin/admin.php?page=gf_entries&id=8&sort=10

    Hope that helps to diagnose the problem.

    Potential work around for some people:

    I deleted the field that was saying “Approved” and recreated it, now I don’t have the issue any more, though that of course results in data loss.

    Also, even when I get the approvals column working I find that every time a new entry is added all previous entries are hidden in the directory. The Entries UI still show ticks for the approved ones and I can re-approve them by unapproving them then reapproving them but it is a manual process as I don’t have the bulk options either.

    Plugin Author Zack Katz

    (@katzwebservices)

    This should be fixed in 4.0. Thanks for reporting!

    Now no entries show up at all, approved or not – help!

    Plugin Author Zack Katz

    (@katzwebservices)

    Are you running 4.1.0.1? That should fix the issue.

    Yes – just updated it just now to 4.1.0.1. (from 3.8.1)

    • This reply was modified 6 years, 8 months ago by caordawebsol.
Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Cannot Approve or Edit entries’ is closed to new replies.