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

Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeFP() #1570

Closed
drblitz-weblab opened this issue Feb 19, 2019 · 7 comments

Comments

@drblitz-weblab
Copy link

Example image render

`<v:media.image
maxW="{data.imagewidth}"
treatIdAsReference="1"
title="{file.title}"
alt="{file.alternative}"
src="{file}"
class="img-responsive"
srcset="{320,480,768,992,1200}"
srcsetDefault="698"
additionalAttributes="{sizes: '(max-width: 992px) 50vw, 100vw'}"

/>`

Error Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeFP()
Typo3 version : 9.5.4
Vhs version :5.1.1

@MisterMarlu
Copy link

TYPO3 removed this method in version 9.

File: typo3/sysext/core/Classes/Utility/GeneralUtility.php in Typo3 version 8

    /**
     * rawurlencode which preserves "/" chars
     * Useful when file paths should keep the "/" chars, but have all other special chars encoded.
     *
     * @param string $str Input string
     * @return string Output string
     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9, use the PHP methods directly instead
     */
    public static function rawUrlEncodeFP($str)
    {
        static::logDeprecatedFunction();
        return str_replace('%2F', '/', rawurlencode($str));
    }

vhs didn't replaced it.

File: Classes/Traits/SourceSetViewHelperTrait.php in vhs version 5.1.1 (and 5.2.0 too)

public function addSourceSet($tag, $src)
    {
        // ...

            $srcsetVariantSrc = rawurldecode($srcsetVariant[3]);
            $srcsetVariantSrc = static::preprocessSourceUri(GeneralUtility::rawUrlEncodeFP($srcsetVariantSrc), $this->arguments);

        // ...
    }

@davdenic
Copy link

Why do you consider this as closed? the PR is not merged yet.
seems other user like me have the same issue.
thanks

@NamelessCoder
Copy link
Member

@davdenic Because the method call no longer exists, as per commit 9af62c4 which closed the issue via annotation. I'm also not sure which PR you are referring to that isn't closed - it doesn't appear to be linked to this issue.

@davdenic
Copy link

davdenic commented Oct 14, 2019

@NamelessCoder sorry, i'm confused, but i still see the error:
Error
Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeFP()
in /var/www/html/web/typo3conf/ext/vhs/Classes/Traits/SourceSetViewHelperTrait.php line 52

and about the PR i was mentioning is about this: 9af62c4 that code i don't see it in version 5.2.0
sorry again. should i open a different bug?
thanks

@NamelessCoder
Copy link
Member

@davdenic It is solved and merged (there are no more calls to the mentioned method at all in VHS) but not yet released. Until the next release is made you can use the dev-development branch. No need for another issue :)

@davdenic
Copy link

davdenic commented Jan 9, 2020

Hi @NamelessCoder do you know if the new release will happen soon?
I'd like to not use dev-development in production if it's possible. thanks 😊

@NamelessCoder
Copy link
Member

@davdenic Today! ;)

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

No branches or pull requests

4 participants