• Resolved keepulookin

    (@keepulookin)


    Hi All,

    I’m getting the following error when using the property search widget on my site to search for Bedrooms (1, 2, 3, 4, or 5+) and when I add the Property ID Numbers to the search widget:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home1/adnoh650/public_html/wp-includes/formatting.php on line 2857

    This is the code on line 2857 of formatting.php:

    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);

    This is the surrounding code:

    function esc_url( $url, $protocols = null, $_context = 'display' ) {
    	$original_url = $url;
    
    	if ( '' == $url )
    		return $url;
    	$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);
    	$strip = array('%0d', '%0a', '%0D', '%0A');
    	$url = _deep_replace($strip, $url);
    	$url = str_replace(';//', '://', $url);

    You can view the error at trypanama.com. Any suggestions on how to fix this error will be greatly appreciated

    I also posted to the studiopress forum for help. The thread is located here: https://www.studiopress.com/forums/topic/agentpress-listing-search-widget/

    https://www.ads-software.com/plugins/agentpress-listings/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ron Rennick

    (@wpmuguru)

    What do your property ID numbers look like?

    Thread Starter keepulookin

    (@keepulookin)

    They are just a few digits. Some examples are 317, 318, 319, 320. The titles are not the same as the property numbers though. They are more like: “New 3 Bedroom Fully Furnished Home For Sale in Quintas de Cabuya, Chame, Panama.” This particular one that has that name is property number 0109

    Plugin Contributor Ron Rennick

    (@wpmuguru)

    How did you add the property ID numbers to the search widget?

    Thread Starter keepulookin

    (@keepulookin)

    Here are the steps I took to add the Property ID numbers to the search widget:
    Appearance > Widgets > Primary Sidebar > AgentPress Listing Search > Edit > ticked the box for Property ID > clicked “Save Widget” button.

    When I go to the front end of the site, the Property IDs appear as part of the widget. Selecting a Property ID and clicking the “Search Properties” button however returns the catchable fatal error. Also, not all of the Property ID numbers appear in the dropdown menu of the search widget.

    The taxonomy for Property ID is propertyid so I don’t think it’s related to the taxonomy itself.

    Thread Starter keepulookin

    (@keepulookin)

    I think there was some conflicting plugins. I deleted a few I no longer needed on the site and am no longer getting the catchable fatal error.

    The property IDs are limited to list the first 100 in the PHP function so if you have more than that, you will need to change that accordingly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AgentPress Listing Search Widget – Catchable Fatal Error’ is closed to new replies.