elementor / elementor/wp2static

guard against undefined notices when getting custom post permalinks

Open
#577 1 comment 0 reactions 0 assignees View on GitHub
investigate
Dominant language
PHP
Stars
1.5k
Forks
294
PR merge metrics
No merged PRs in 30d

Description

have seen this before, but didn't isolate/troubleshoot it to completion. suspect within URL detection.

may be possible to replicate by installing/removing WooCommerce and some products or some custom post types

notice logged when occurring:

```
Notice: Trying to get property 'hierarchical' of non-object in .../wp-includes/link-template.php on line 282
Notice: Trying to get property 'query_var' of non-object in .../wp-includes/link-template.php on line 292
```

- reported by user at https://staticword.press/t/crawling-not-working
- https://wpml.org/forums/topic/notice-trying-to-get-property-of-non-object-in-link-template-php-on-line-49/

suggest debugging the `link-template.php` and see which links it's failing on.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.