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

Fix image links in documentation #21

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schliesser
Copy link
Contributor

$reflectionObject->getFileName() returns /var/www/html/packages/project_core/Components/Organisms/Content/TextMedia when the extension is symlinked by composer from packages to typo3conf/ext.

This is a more dynamic approach to get the relative document directory. But I think it needs more work:

  • Currently substr(Environment::getExtensionsPath(), strlen(Environment::getPublicPath())); returns "/typo3conf/ext" like it's defined in the class "Environment". If TYPO3 would ever change the extension location we would be save, but for performance we could remove the string handling and just conactenate the strings like: '/typo3conf/ext/' . $extDocPath. As done in class "Environment".
  • I think if TYPO3 is installed in a subdirectory the image links wouldn't be correct. Actually I don't have this case myself but maybe someone else has.

`$reflectionObject->getFileName()` returns `/var/www/html/packages/project_core/Components/Organisms/Content/TextMedia` when the extension is symlinked by composer from packages to typo3conf/ext.

This is a more dynamic approach to get the relative document directory. But I think it needs more work:
* Currently `substr(Environment::getExtensionsPath(), strlen(Environment::getPublicPath()));` returns "/typo3conf/ext" like it's defined in the class "Environment". If TYPO3 would ever change the extension location we would be save, but for performance we could remove the string handling and just conactenate the strings like: `'/typo3conf/ext/' . $extDocPath`. As done in class "Environment".
* I think if TYPO3 is installed in a subdirectory the image links wouldn't be correct. Actually I don't have this case myself but maybe someone else has.
@schliesser
Copy link
Contributor Author

schliesser commented Jun 9, 2020

I marked the PR as work in progress, as I think it's not ready to merge. But I want to make aware of the issue ;-)

Edit: found the draft function of github. (I'm used to gitlab)

@schliesser schliesser marked this pull request as draft June 9, 2020 11:25
@schliesser schliesser changed the title WIP: Fix image links in documentation Fix image links in documentation Jun 9, 2020
@jkphl
Copy link
Member

jkphl commented Jun 29, 2020

@schliesser Great, thanks! Just let me know as soon as you consider the PR as finished. ;)

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

Successfully merging this pull request may close these issues.

2 participants