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

Editing Links in Other Content-Elements #13

Open
MediKathi opened this issue Jan 22, 2021 · 0 comments
Open

Editing Links in Other Content-Elements #13

MediKathi opened this issue Jan 22, 2021 · 0 comments

Comments

@MediKathi
Copy link

Hello,

while px_shopware is installed it causes an

Oops, an error occurred!
$haystack can not be interpreted as string

More information regarding this error might be available online.

Message when editing a link via the DCE Editor (normal Text Element on the site).

I hat to change code in the php file

typo3conf/ext/px_shopware/Classes/LinkHandler/AbstractLinkHandler.php

    /**
     * @inheritdoc
     */
    public function canHandleLink(array $linkParts)
    {
        if (!$linkParts['url']) {
            return false;
        }
        $url = rawurldecode($linkParts['url']);
        if($url == null) {
            return false; //without this, typo3 breaks when trying to edit an link in the DCE
        }
        if (StringUtility::beginsWith($url, $this->getPrefix())) {
            $id = intval(substr($url, strlen($this->getPrefix())));
            $this->object = $this->client->findById($id);
            return true;
        }
        return false;
    }
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

1 participant