Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Fatal error: Uncaught TypeError: WP_Rocket\Engine\Optimization\CacheDynamicResource::set_cached_import(): Argument #1 when visit page template with dynamicc php that doesnot exist #7256

Open
Mai-Saad opened this issue Jan 28, 2025 · 0 comments
Labels
priority: low Issues that can wait severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior

Comments

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Jan 28, 2025

Describe the bug
When visiting FE of page template https://subdomain.rocketlabsqa.ovh/llbgcss/ after fresh install and activation , we have fatal error

[28-Jan-2025 14:54:23 UTC] PHP Fatal error:  Uncaught TypeError: WP_Rocket\Engine\Optimization\CacheDynamicResource::set_cached_import(): Argument #1 ($path) must be of type string, false given, called in /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CSSTrait.php on line 56 and defined in /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CSSTrait.php:537
Stack trace:
#0 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CSSTrait.php(56): WP_Rocket\Engine\Optimization\CacheDynamicResource->set_cached_import()
#1 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CacheDynamicResource.php(168): WP_Rocket\Engine\Optimization\CacheDynamicResource->rewrite_paths()
#2 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CacheDynamicResource.php(134): WP_Rocket\Engine\Optimization\CacheDynamicResource->replace_url()
#3 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(326): WP_Rocket\Engine\Optimization\CacheDynamicResource->cache_dynamic_resource()
#4 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-styles.php(412): apply_filters()
#6 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-styles.php(221): WP_Styles->_css_href()
#7 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-dependencies.php(137): WP_Styles->do_item()
#8 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/functions.wp-styles.php(68): WP_Dependencies->do_items()
#9 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(324): wp_print_styles()
#10 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#11 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#12 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/general-template.php(3065): do_action()
#13 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/rocket-test-data/templates/llbgcss_subsite1.php(51): wp_head()
#14 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-includes/template-loader.php(106): include('...')
#15 /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-blog-header.php(19): require_once('...')
#16 /var/www/subdomain.rocketlabsqa.ovh/htdocs/index.php(17): require('...')
#17 {main}
  thrown in /var/www/subdomain.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CSSTrait.php on line 537

To Reproduce
Steps to reproduce the behavior:

  1. Install WPR 3.18 on multisite subdomain
  2. activate WPR on main site
  3. Visit page https://subdomain.rocketlabsqa.ovh/llbgcss/
  4. See error

Expected behavior
No fatal error even if there are styles with 404

Environment

  • WordPress: 6.6.2
  • PHP: 8.3.15
  • Server: nginx/1.26.2
  • Database: mysqli (Server: 10.6.20-MariaDB-ubu2204-log / Client: mysqlnd 8.3.15)
  • Browser: Chrome 131.0.0.0
  • OS: Linux
  • Theme: Twenty Twenty-One 1.8
  • Plugins:
    • Action Scheduler 3.8.1
    • Imagify 2.2.4
    • Nginx Helper 2.2.3
    • SQL Buddy 1.0.0
    • Test Reports 1.2.0
    • WooCommerce 9.3.3
    • WP Media | Template Loader plugin. 1.0.0
    • WPML Multilingual CMS 4.6.5
    • WP Rocket 3.18
@Mai-Saad Mai-Saad added type: bug Indicates an unexpected problem or unintended behavior priority: low Issues that can wait severity: major Feature is not working as expected and no work around available labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Issues that can wait severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant