WordPress.org

Making WordPress.org

Opened 2 months ago

Closed 2 months ago

#3211 closed defect (invalid)

Cannot redeclare function as JetPack uses that function name already

Reported by: casiepa Owned by:
Milestone: Priority: normal
Component: WordPress.tv Keywords:
Cc:

Description

Provisionning a local vvv install, I'm getting the following error:

==> default: Fatal error: Cannot redeclare video_image_url_by_guid() (previously declared in /srv/www/wordpress-meta-environment/meta-repository/wordpress.tv/public_html/wp-content/mu-plugins/sandbox-functionality.php:20) in /srv/www/wordpress-meta-environment/meta-repository/wordpress.tv/public_html/wp-content/plugins/jetpack/modules/videopress/utility-functions.php on line 630

Please change the name of the function in the sandbox mu plugin for WPTV.

Change History (4)

This ticket was mentioned in Slack in #meta-wordcamp by casiepa. View the logs.


2 months ago

#2 @SergeyBiryukov
2 months ago

That file only exists in Meta Environment repo on GitHub, so perhaps it should have been reported there, but I guess here is fine as well :)

The function is there as a fallback so it could be used in the_video() and the_video_image() in wptv2 theme without Jetpack, so changing the name doesn't make much sense.

I think it should be moved to the theme itself, with a function_exists() check (a check alone wouldn't be enough, as mu-plugins load earlier than regular plugins).

#3 @grapplerulrich
2 months ago

There is already a PR for this in the meta environment https://github.com/WordPress/meta-environment/pull/97

#4 @casiepa
2 months ago

  • Resolution set to invalid
  • Status changed from new to closed

Closing as GitHub pull request is the way to go.

Note: See TracTickets for help on using tickets.