WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years 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.


4 years ago

#2 @SergeyBiryukov
4 years 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
4 years ago

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

#4 @casiepa
4 years 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.