strange code warning at bottom of page
-
hey @arminunruh, i'm reworking a website just now and updated lay to activate overlays. The following errors started being displayed at the bottom of the page and on other pages the errors were longer and mentioned my custom id tags I had applied to certain elements. I've reverted to 5.9.6 which doesn't display the error.
Just a heads up.
The errors:
Warning: DOMDocument::loadHTML(): ID grid-css already defined in Entity, line: 49 in /home/customer/www/scapscotland.com/public_html/wp-content/themes/lay/frontend/assets/php/overlays/overlays.php on line 40
Warning: DOMDocument::loadHTML(): ID phone-grid-css already defined in Entity, line: 160 in /home/customer/www/scapscotland.com/public_html/wp-content/themes/lay/frontend/assets/php/overlays/overlays.php on line 40
Warning: DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 219 in /home/customer/www/scapscotland.com/public_html/wp-content/themes/lay/frontend/assets/php/overlays/overlays.php on line 40
Warning: DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 236 in /home/customer/www/scapscotland.com/public_html/wp-content/themes/lay/frontend/assets/php/overlays/overlays.php on line 40
-
yea
its just a warning, not an error.
you need to disable wp_debug in your wp-config.php so the warning wont show updefine( 'WP_DEBUG', false );
-
basically im traversing the html of pages to find all links to overlays, so i only pre-load overlays that are linked to on the current page
because that html contains multiple elements of id "grid-css", that php shows a warning, because html is supposed to only have unique ids :D
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it