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

autoloader can't find Podlove\Webvtt\Parser #1175

Closed
eteubert opened this issue Nov 25, 2020 · 3 comments
Closed

autoloader can't find Podlove\Webvtt\Parser #1175

eteubert opened this issue Nov 25, 2020 · 3 comments
Labels

Comments

@eteubert
Copy link
Member

Sometimes the autoloader can't find the Class 'Podlove\Webvtt\Parser'.

I used release 3.1.18 locally and it works.
On podlovers.org (and other user reports) the error occurs.

I've been digging on podlovers.org for ~an hour but no idea yet why the class isn't found. composer autoloader files seem fine.

source: https://sendegate.de/t/upload-von-transcripts-nicht-moeglich/12560

Example error log

PHP Fatal error:  Uncaught Error: Class 'Podlove\Webvtt\Parser' not found in /var/www/html/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/lib/modules/transcripts/transcripts.php:263
Stack trace:
#0 /var/www/html/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/lib/modules/transcripts/transcripts.php(182): Podlove\Modules\Transcripts\Transcripts::parse_and_import_webvtt(Object(Podlove\Model\Episode), 'WEBVTT\n\n00:00:0...')
#1 /var/www/html/wp-includes/class-wp-hook.php(287): Podlove\Modules\Transcripts\Transcripts->ajax_transcript_import('')
#2 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#3 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#4 /var/www/html/wp-admin/admin-ajax.php(176): do_action('wp_ajax_podlove...')
#5 {main}
  thrown in /var/www/html/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/lib/modules/transcripts/transcripts.php on line 263
[23-Nov-2020 20:29:57 UTC] Array
(
    [message] => Class Autoload failed for "Parser"
    [attempts] => Array
        (
            [0] => /var/www/html/wp-content/plugins/podlove-podcasting-plugin-for-wordpress/lib/webvtt/parser.php
        )

    [trace] => Array
        (
            [0] => podlove_autoloader
            [1] => spl_autoload_call
            [2] => parse_and_import_webvtt
            [3] => ajax_transcript_import
            [4] => apply_filters
            [5] => do_action
            [6] => do_action
        )

)
@eteubert eteubert added the bug label Nov 25, 2020
@eteubert
Copy link
Member Author

Unconfirmed suspicion: the class file is parser.php but according to PSR-0 it should be Parser.php -- so it would work on case-insensitive file systems and break on case-sensitive file systems.

Since PSR-0 is deprecated, I should upgrade the webvtt package to PSR-4 and see if that resolves the issue.

@benhartwich
Copy link

I can confirm this issue.

@eteubert
Copy link
Member Author

fixed in 3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants