Comments (3)
The deprecation warnings reported by plugintests
are visible on the AMP > Error Index
page with PHP 8.1.
Stack trace
Array
(
[0] => Array
(
[file] => /app/public/core-dev/build/wp-admin/includes/class-wp-list-table.php
[line] => 1782
[function] => handle_row_actions
[class] => WP_Terms_List_Table
[type] => ->
)
[1] => Array
(
[file] => /app/public/core-dev/build/wp-admin/includes/class-wp-terms-list-table.php
[line] => 352
[function] => single_row_columns
[class] => WP_List_Table
[type] => ->
)
[2] => Array
(
[file] => /app/public/core-dev/build/wp-admin/includes/class-wp-terms-list-table.php
[line] => 260
[function] => single_row
[class] => WP_Terms_List_Table
[type] => ->
)
[3] => Array
(
[file] => /app/public/core-dev/build/wp-admin/includes/class-wp-list-table.php
[line] => 1618
[function] => display_rows_or_placeholder
[class] => WP_Terms_List_Table
[type] => ->
)
[4] => Array
(
[file] => /app/public/core-dev/build/wp-admin/edit-tags.php
[line] => 611
[function] => display
[class] => WP_List_Table
[type] => ->
)
)
Inside handle_row_actions
it generates an edit link for a given term ID which then checks if the current user can edit a particular term ID with edit_term capability. In our case we are using custom capabilities hence it passes null
to the add_query_arg()
which then generates deprecation warnings.
from amp-wp.
@westonruter Reported deprecation warnings are caused by the AMP plugin. Even in the PHPUnit tests CI, we thought all deprecation warnings were due to the GB plugin, but they were due to the AMP plugin as well.
amp-wp/includes/validation/class-amp-validation-error-taxonomy.php
Lines 2889 to 2892 in b7a1e1f
get_edit_post_link( $post_id, 'raw' )
always returns null, and later these deprecation warnings are generated within add_query_arg()
. Seems like at this point of execution user does not have permission to edit the post hence get_edit_post_link( $post_id, 'raw' )
is returning null.
EDIT:
The above one is only responsible for deprecation warnings in unit tests.
from amp-wp.
QA Passed ✅
Cross-verified the issue and it is working fine. With the WordPress 6.3 the warnings are still visible. These warnings have been successfully addressed in WordPress version 6.4 through this Pull Request - WordPress/wordpress-develop#5198
Before fix | After fix |
---|---|
from amp-wp.
Related Issues (20)
- Running `npm run env:start` fails with PHP 7.4 HOT 1
- Reader mode showing incorrect timestamps for posts HOT 1
- Feature image stretched on Legacy theme, when native image is being used. HOT 1
- Deprecate googleanalytics (UA) vendor type in favor of gtag (GA4) HOT 2
- Eliminate gutenberg-packages-update workflow in favor of native Dependabot grouping HOT 1
- Update theme_has_theme_json to reflect WP 6.3 changes HOT 1
- PHPUnit tests fail in development environment
- Canonical url not generate properly HOT 1
- wp-polyfill-inert missing data-ampdevmode attribute HOT 1
- Very Urgent : AMP Runtime error HOT 5
- Update node to 16 or 18 HOT 2
- Update spec to include fetchpriority support HOT 8
- Remove Gfycat HOT 1
- Call to `_admin_bar_bump_cb` causes deprecation error in WordPress 6.4+ HOT 3
- Omit page caching and object caching tests for Site Health if on WP>=6.1 HOT 7
- Update `AMP_Core_Block_Handler` to handle interactivity API enabled blocks HOT 1
- Lightbox images ("Expand on click") in WordPress 6.4 is broken on AMP pages HOT 1
- Search block with "button only" configuration is broken
- The attribute 'fetchpriority' may not appear in tag 'img' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amp-wp.