Support

Account

Home Forums Backend Issues (wp-admin) Page link and Page object not working

Page link and Page object not working

  • Hi @elliot

    I’ve got some issues which I can’t seem to figure out.. I recently updated an entire site, wordpress and plugins. And now I also updated ACF. Everything works fine except for the page link and post object fields.. and since the page link field is basically using the post object field I’m guessing that’s where the issue is..

    It does not provide any php errors but when I add a page link field (or post object) to a field group the rendering of that group stops at the field and with the field being completely empty.. So it’s really like an php-error which breaks further rendering.

    I’ve tried to debug the code in the field file and rewrite some stuff but can’t seem to find the issue or make it work..!

    Would be very grateful if you could take a look at it and see if it’s a general bug or if its an isolated thing.

    The setup I had while noticing it was the page link field as the last field inside a repeater.

    Thanks / Jonathan

  • Hi @Jonathan

    There are a few things that could be going on, but most likely there is an infinite loop / timeout happening when a post object is loaded for the dropdown select.

    Are you able to debug the post_object field type?

    Also, check your server logs for any PHP errors

  • Hi @elliot,

    You’re probably right.. however I’m having difficulties debugging the field type. Nothing is being registered in the debug.log file. Probably since it’s being loaded with ajax and the ajax call works..

    The only error I get is this js-error: Uncaught TypeError: Object [object Object] has no method ‘sortable’

    But I’m pretty sure that’s due to the wysiwyg script not loading since the post object field disrupts the loading.

    Do you have any tricks to get the field to output errors? I’ve tried doing print_r with a die(); right after but there’s no output anywhere.

    EDIT:

    Okay so I tried disabling all other plugins with no luck, so I guess that’s not the issue.. I did manage to get this error at the place where the field should have appeared in page edit: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/qa.nord-lock.com/wwwroot/wp-includes/wp-db.php on line 1225
    which I suppose makes your guess for it to be a loop correct. Now I just have to figure out why the hell its looping..

  • Alright..

    I tried changing the get_pages to a wp_query and setting the numberposts to 100 which then workes.. So I’m guessing that this has to do with the clients site actually having such a monstrous amount of pages.

    My solution to this was to change the post link field to a relationship field since that uses ajax and does not have to fetch all posts at once.

    There’s a new issue with the relationship field tho that I’ll post in a new topic to not clutter things up.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Page link and Page object not working’ is closed to new replies.