lochmueller / perfectlightbox

TYPO3 CMS Extension - perfectlightbox
http://typo3.org/extensions/repository/view/perfectlightbox
3 stars 9 forks source link

perfectlightbox "Array" before img #2

Closed ryrun closed 8 years ago

ryrun commented 8 years ago

I'm using perfectlight 4.0.2 in typo3 4.6.9 with PHP 5.6.23.

Its a project which is using the css_styled_content Template system.

It seems it doesn't work. Lightbox was checked, but it just output "Array" to the html source code.

<div class="csc-textpic-imagewrap"><div class="csc-textpic-image csc-textpic-last">Array<img src="fileadmin/_processed_/7/d/csm_lebenshilfe_b4972cc5de.jpg" alt="" border="0" height="225" width="300"></div></div>
lochmueller commented 8 years ago

Hey @ryrun Do you run same debugging, why an "Array" is in the output? Regards, Tim

ryrun commented 8 years ago

It could be related to #1

When i reinstall the extension typo3 show me the error:

Oops, an error occurred!

Could not scan for classes inside "/var/www/vhosts/***/typo3conf/ext/perfectlightbox/Classes/" which does not appear to be a file nor a folder
ryrun commented 8 years ago

It seems there is something wrong with this:

tt_content.image.20.1.imageLinkWrap.typolink.parameter.override.cObject.file.import.data = TSFE:lastImageInfo|origFile

Chaning the value to a different one, remove the "Array" output. I currently playing with different values.

Edit: This is currently my workaround:

tt_content.image.20.1.imageLinkWrap.typolink >
tt_content.image.20.1.imageLinkWrap.directImageLink = 1
tt_content.image.20.1.imageLinkWrap.JSwindow = 0
tt_content.image.20.1.imageLinkWrap.linkParams = rel="lightbox"
Minston commented 8 years ago

Hi, your workaround works, but when image has a link, it should do the redirect when image is pressed, but all images opens in lightbox.

ryrun commented 8 years ago

Yep, my workaround is not fully working. I'm still not sure why "TSFE:lastImageInfo|origFile" doens't work correctly on the latest typo3 version. I think the typoscript of perfectlightbox should be changed to use "directImageLink".

Minston commented 8 years ago

I'am kinda new at typo3 and especially with typoscript :)

What I found is that it has to do something with userFunc = tx_perfectlightbox->main I tried to play around with main(), but "Array" was returned .

My solution that works with image links is to modify static/setup.txt

### Including the userfunc needed for the final link-manipulation (adding the lightbox-vars)
### It also contains the function user_ttnewsImageMarkerFunc to enable correct splitting of caption/alttest/titletext for news-images
includeLibs.perfectlightbox = EXT:perfectlightbox/class.tx_perfectlightbox.php
tt_content.image.20.1 {
    titleText.override.field = {$plugin.perfectlightbox.captionField}
}

And commented everything that was below with global stuff and tt_news. That means that is disabled all functionality that offers class.tx_perfectlightbox.php. Also fixed BE to hide checkboxes for that aditional options. So for my case it works fine :) I think, it has something to do with typoscript userFunc.

fabtho commented 8 years ago

same here, just removed perfectlightbox from my project because of this bug. Workaround not working, if you want to use images as link to files.

Chrissitopher commented 8 years ago

I am having this issue as well and I would like to get it fixed.

@ryrun: TSFE:lastImageInfo|origFile obviously no longer is influencing the output. However, the property itself in other places is working correctly (at least for me). This property itself is ok. The problem must be somewhere else.

@lochmueller: I would test a fix, Tim! So if you have something...don't hesitate to give it to me!

lochmueller commented 8 years ago

Hey @Chrissitopher , I am not the maintainer of the extension and do not use it anymore. But I also don't know, if @beniediek will release more releases in the feature ;( Regards, Tim

Chrissitopher commented 8 years ago

Thanks for the info, Tim!

I have now fixed the issue - see above commit.

@beniediek: Please have a heart and consider this fix! :-)

SventB commented 7 years ago

Ist this fixed? I still get the text "Array" before the img tag.

derhecht commented 7 years ago

Yes, but (as always) no new release was triggered so not fetched automatically. Fuck off guys this error keeps me ours to find.

cboltz commented 6 years ago

I still see the "Array" with the latest version from git :-( (ext_emconf.php says version 4.1.1) - any idea what else I could do?

In case it matters: Typo3 version is 7.6.28 (just updated from 6.2.x)

ryrun commented 6 years ago

@cboltz You should check these constants. As far as i know, its available since typo3 v6.2

styles.content.imgtext.linkWrap.lightboxEnabled styles.content.imgtext.linkWrap.lightboxCssClass styles.content.imgtext.linkWrap.lightboxRelAttribute

You can still use the javascript files of perfectlightbox.

cboltz commented 6 years ago

Good news - after updating to 8.7.x and several other changes, the lightbox works again :-)

The only "problem" is that I'm not sure which of my changes fixed it - but that's a luxory problem ;-)