Allowed pages option not saving properly
-
Hello,
When upgrading to the latest version(2.4.1) and using a custom implementation, I noticed in this version you are no longer allowing ap queries to work on custom pages without selecting the pages in your settings section.
That’s cool. The only problem is that when you actually select a page, it doesn’t appear to be saving to my wp_options table correctly.
When I save a page(s) I look at my db and see the ap_allowed_pages option I do see one page ID saved in there(despite the fact that I entered in several). And when I navigate to that custom page, the query does not work. I noticed on line 745 in inc/functions.php , I see that you are grabbing the option to see if it’s an allowed page. The problem is that the code on line 746 is expecting an array of IDs of allowed pages, but the actual option returned is a string. So even if you do save a page, the functionality breaks when you try and retrieve it. Does that make sense? So in essence, the ability to select a custom page does not work at all. It seems like when saving the option on line 187,$_REQUEST['ap_allowed_pages']
needs to be converted to an array before you save it or the data saved is not at all helpful when outputting it on the front end. Can you take a look at this?
- The topic ‘Allowed pages option not saving properly’ is closed to new replies.