Skip Navigation

[Resolved] PHP Notice when using Views debug

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#1206449

I checkmarked the debug thingy and getting this now:

Notice: A non well formed numeric value encountered in F:xampphtdocswordpresswp-contentpluginswp-viewsembeddedincwpv-query-debug.class.php on line 382

#1206456

Hi, are you referring to the checkmark in Toolset > Settings > Front-end Content > Enable Views debug mode ?
- If so, can you tell me if the notice appears for both full and compact modes, or only one mode?
- Is the notice generated only when loading a specific page, only in wp-admin, or on all pages of the site?
- Is the debug window actually displayed? If so, toggle open all the sections of the window and copy + paste the contents here for me to review.

#1207188

Hello Christian,

Yes, thats the debug mode I meant.
The notice appears on both modes. Only on specific pages, where I have views embedded. 8 times per site.

Here comes the copypasta...

MySQL-Query

SELECT   27Y9A3zj_posts.* FROM 27Y9A3zj_posts  WHERE 1=1  AND 27Y9A3zj_posts.post_type = 'xxx' AND ((27Y9A3zj_posts.post_status = 'publish' OR 27Y9A3zj_posts.post_status = 'private'))  ORDER BY 27Y9A3zj_posts.post_date DESC 

Query-Results

WP_Query Object
(
    [query] => Array
        (
            [post_type] => xxx
        )

    [query_vars] => Array
        (
            [post_type] => xxx
            [error] => 
            [m] => 
            [p] => 0
            [post_parent] => 
            [subpost] => 
            [subpost_id] => 
            [attachment] => 
            [attachment_id] => 0
            [name] => 
            [static] => 
            [pagename] => 
            [page_id] => 0
            [second] => 
            [minute] => 
            [hour] => 
            [day] => 0
            [monthnum] => 0
            [year] => 0
            [w] => 0
            [category_name] => 
            [tag] => 
            [cat] => 
            [tag_id] => 
            [author] => 
            [author_name] => 
            [feed] => 
            [tb] => 
            [paged] => 0
            [meta_key] => 
            [meta_value] => 
            [preview] => 
            [s] => 
            [sentence] => 
            [title] => 
            [fields] => 
            [menu_order] => 
            [embed] => 
            [category__in] => Array
                (
                )

            [category__not_in] => Array
                (
                )

            [category__and] => Array
                (
                )

            [post__in] => Array
                (
                )

            [post__not_in] => Array
                (
                )

            [post_name__in] => Array
                (
                )

            [tag__in] => Array
                (
                )

            [tag__not_in] => Array
                (
                )

            [tag__and] => Array
                (
                )

            [tag_slug__in] => Array
                (
                )

            [tag_slug__and] => Array
                (
                )

            [post_parent__in] => Array
                (
                )

            [post_parent__not_in] => Array
                (
                )

            [author__in] => Array
                (
                )

            [author__not_in] => Array
                (
                )

            [orderby] => date
            [order] => DESC
            [posts_per_page] => -1
            [post_status] => Array
                (
                    [0] => publish
                    [1] => private
                )

            [ignore_sticky_posts] => 
            [suppress_filters] => 
            [cache_results] => 1
            [update_post_term_cache] => 1
            [lazy_load_term_meta] => 1
            [update_post_meta_cache] => 1
            [nopaging] => 1
            [comments_per_page] => 50
            [no_found_rows] => 
        )

    [tax_query] => WP_Tax_Query Object
        (
            [queries] => Array
                (
                )

            [relation] => AND
            [table_aliases:protected] => Array
                (
                )

            [queried_terms] => Array
                (
                )

            [primary_table] => 27Y9A3zj_posts
            [primary_id_column] => ID
        )

    [meta_query] => WP_Meta_Query Object
        (
            [queries] => Array
                (
                )

            [relation] => 
            [meta_table] => 
            [meta_id_column] => 
            [primary_table] => 
            [primary_id_column] => 
            [table_aliases:protected] => Array
                (
                )

            [clauses:protected] => Array
                (
                )

            [has_or_relation:protected] => 
        )

    [date_query] => 
    [request] => SELECT   27Y9A3zj_posts.* FROM 27Y9A3zj_posts  WHERE 1=1  AND 27Y9A3zj_posts.post_type = 'xxx' AND ((27Y9A3zj_posts.post_status = 'publish' OR 27Y9A3zj_posts.post_status = 'private'))  ORDER BY 27Y9A3zj_posts.post_date DESC 
    [posts] => Array
        (
            [0] => WP_Post Object
                (
                    [ID] => 55
                    [post_author] => 0
                    [post_date] => 2019-02-25 20:50:28
                    [post_date_gmt] => 2019-02-25 19:50:28
                    [post_content] => <!-- wp:paragraph -->
<p>lkjkjklja a akhm,a ajk aöjhaökj s öuökls ökljs </p>
<!-- /wp:paragraph -->
                    [post_title] => xx zum test 2
                    [post_excerpt] => 
                    [post_status] => publish
                    [comment_status] => open
                    [ping_status] => closed
                    [post_password] => 
                    [post_name] => xxx-zum-test-2
                    [to_ping] => 
                    [pinged] => 
                    [post_modified] => 2019-02-25 20:50:30
                    [post_modified_gmt] => 2019-02-25 19:50:30
                    [post_content_filtered] => 
                    [post_parent] => 0
                    [guid] => <em><u>hidden link</u></em>
                    [menu_order] => 0
                    [post_type] => xxx
                    [post_mime_type] => 
                    [comment_count] => 0
                    [filter] => raw
                )

            [1] => WP_Post Object
                (
                    [ID] => 53
                    [post_author] => 0
                    [post_date] => 2019-02-25 20:27:12
                    [post_date_gmt] => 2019-02-25 19:27:12
                    [post_content] => <!-- wp:paragraph -->
<p>Dies das</p>
<!-- /wp:paragraph -->
                    [post_title] => Test xxx Eins
                    [post_excerpt] => 
                    [post_status] => publish
                    [comment_status] => open
                    [ping_status] => closed
                    [post_password] => 
                    [post_name] => test-xxx-eins
                    [to_ping] => 
                    [pinged] => 
                    [post_modified] => 2019-02-25 20:27:14
                    [post_modified_gmt] => 2019-02-25 19:27:14
                    [post_content_filtered] => 
                    [post_parent] => 0
                    [guid] => <em><u>hidden link</u></em>
                    [menu_order] => 0
                    [post_type] => xxx
                    [post_mime_type] => 
                    [comment_count] => 0
                    [filter] => raw
                )

            [2] => WP_Post Object
                (
                    [ID] => 20
                    [post_author] => 0
                    [post_date] => 2019-02-22 13:20:36
                    [post_date_gmt] => 2019-02-22 12:20:36
                    [post_content] => <!-- wp:paragraph -->
<p>bla bla bla</p>
<!-- /wp:paragraph -->
                    [post_title] => xxx
                    [post_excerpt] => 
                    [post_status] => publish
                    [comment_status] => open
                    [ping_status] => closed
                    [post_password] => 
                    [post_name] => xxx
                    [to_ping] => 
                    [pinged] => 
                    [post_modified] => 2019-02-26 17:46:28
                    [post_modified_gmt] => 2019-02-26 16:46:28
                    [post_content_filtered] => 
                    [post_parent] => 0
                    [guid] => <em><u>hidden link</u></em>
                    [menu_order] => 0
                    [post_type] => xxx
                    [post_mime_type] => 
                    [comment_count] => 0
                    [filter] => raw
                )

        )

    [post_count] => 3
    [current_post] => -1
    [in_the_loop] => 
    [post] => WP_Post Object
        (
            [ID] => 55
            [post_author] => 0
            [post_date] => 2019-02-25 20:50:28
            [post_date_gmt] => 2019-02-25 19:50:28
            [post_content] => <!-- wp:paragraph -->
<p>lkjkjklja a akhm,a ajk aöjhaökj s öuökls ökljs </p>
<!-- /wp:paragraph -->
            [post_title] => xxx zum test 2
            [post_excerpt] => 
            [post_status] => publish
            [comment_status] => open
            [ping_status] => closed
            [post_password] => 
            [post_name] => xxx-zum-test-2
            [to_ping] => 
            [pinged] => 
            [post_modified] => 2019-02-25 20:50:30
            [post_modified_gmt] => 2019-02-25 19:50:30
            [post_content_filtered] => 
            [post_parent] => 0
            [guid] => <em><u>hidden link</u></em>
            [menu_order] => 0
            [post_type] => xxx
            [post_mime_type] => 
            [comment_count] => 0
            [filter] => raw
        )

    [comment_count] => 0
    [current_comment] => -1
    [found_posts] => 3
    [max_num_pages] => 0
    [max_num_comment_pages] => 0
    [is_single] => 
    [is_preview] => 
    [is_page] => 
    [is_archive] => 1
    [is_date] => 
    [is_year] => 
    [is_month] => 
    [is_day] => 
    [is_time] => 
    [is_author] => 
    [is_category] => 
    [is_tag] => 
    [is_tax] => 
    [is_search] => 
    [is_feed] => 
    [is_comment_feed] => 
    [is_trackback] => 
    [is_home] => 
    [is_404] => 
    [is_embed] => 
    [is_paged] => 
    [is_admin] => 
    [is_attachment] => 
    [is_singular] => 
    [is_robots] => 
    [is_posts_page] => 
    [is_post_type_archive] => 1
    [query_vars_hash:WP_Query:private] => 898c7ec1db95486fda964da0bbebb1f1
    [query_vars_changed:WP_Query:private] => 1
    [thumbnails_cached] => 
    [stopwords:WP_Query:private] => 
    [compat_fields:WP_Query:private] => Array
        (
            [0] => query_vars_hash
            [1] => query_vars_changed
        )

    [compat_methods:WP_Query:private] => Array
        (
            [0] => init_query_flags
            [1] => parse_tax_query
        )

)

WordPress-Archive Loop
I got three posts so far but only copy one here to keep it "short"

Array

	

WP_Post Object
(
    [ID] => 55
    [post_author] => 0
    [post_date] => 2019-02-25 20:50:28
    [post_date_gmt] => 2019-02-25 19:50:28
    [post_content] => <!-- wp:paragraph -->
<p>lkjkjklja a akhm,a ajk aöjhaökj s öuökls ökljs </p>
<!-- /wp:paragraph -->
    [post_title] => xxx zum test 2
    [post_excerpt] => 
    [post_status] => publish
    [comment_status] => open
    [ping_status] => closed
    [post_password] => 
    [post_name] => xxx-zum-test-2
    [to_ping] => 
    [pinged] => 
    [post_modified] => 2019-02-25 20:50:30
    [post_modified_gmt] => 2019-02-25 19:50:30
    [post_content_filtered] => 
    [post_parent] => 0
    [guid] => <em><u>hidden link</u></em>
    [menu_order] => 0
    [post_type] => xxx
    [post_mime_type] => 
    [comment_count] => 0
    [filter] => raw
)

Original Content

	
		
		<tr>
			<td>
				[wpv-post-body view_template="loop-item-in-xxx"]
			</td>
		

Shortcodes -> wpv-post-body

Attribute: {"item":null,"id":null,"post_id":null,"view_template":"loop-item-in-xxx","output":"normal","suppress_filters":"false"}
Infos: Output shown in the Nested elements section

Nested Array

WP_Post Object
(
    [ID] => 55
    [post_author] => 0
    [post_date] => 2019-02-25 20:50:28
    [post_date_gmt] => 2019-02-25 19:50:28
    [post_content] => <!-- wp:paragraph -->
<p>lkjkjklja a akhm,a ajk aöjhaökj s öuökls ökljs </p>
<!-- /wp:paragraph -->
    [post_title] => xxx zum test 2
    [post_excerpt] => 
    [post_status] => publish
    [comment_status] => open
    [ping_status] => closed
    [post_password] => 
    [post_name] => xxx-zum-test-2
    [to_ping] => 
    [pinged] => 
    [post_modified] => 2019-02-25 20:50:30
    [post_modified_gmt] => 2019-02-25 19:50:30
    [post_content_filtered] => 
    [post_parent] => 0
    [guid] => <em><u>hidden link</u></em>
    [menu_order] => 0
    [post_type] => xxx
    [post_mime_type] => 
    [comment_count] => 0
    [filter] => raw
    [view_template_override] => loop-item-in-xxx
)

Nested Original

<div align="center">
[wpv-post-featured-image size="custom" width="200" height="110"]
</div>

Nested Shortcodes wpv-post-featured-image

Attribute: {"item":null,"id":null,"post_id":null,"size":"custom","output":"img","raw":"false","data":"","attr":"","class":"","width":"200","height":"110","crop":false,"crop_horizontal":"center","crop_vertical":"center"}
Infos: Data received from cache
Output: <img src="<em><u>hidden link</u></em>" />

Nested Output Raw

<div align="center">
<img src="<em><u>hidden link</u></em>" />
</div>

Outpu Raw

<tr>
			<td>
				<div align="center">
<img src="<em><u>hidden link</u></em>" />
</div>
			</td>
#1207201

Okay I don't see anything obviously wrong here. I think it would be best for me to work with a clone of your site so I can run some additional tests locally to try to reproduce the problem. I can work with a Duplicator clone, All-in-One WP Migration clone, or a zip package containing a database dump and your theme and plugins directories. I will activate private reply fields here so you can share a download link.