jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Bugs => Topic started by: Antar on 25.09.2016 13:25:28

Title: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 25.09.2016 13:25:28







Jdownloads suddenly start showing notices where there never been notice at all. For example, in the Joomla tag list view or in the Joomla category view. This lines:
QuoteNotice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1445

Notice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1445

Notice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1482

Notice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1445

Notice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1445

Notice: Undefined variable: jlistConfig in /var/www/plugins/content/jdownloads/jdownloads.php on line 1482

What is it?
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 25.09.2016 13:56:05
I see engine includes some lines in the head where they should not be because there's no jDownloads tags or menu items or files or whatever:



Quote<link rel="stylesheet" href="https://-=MYSYTE=-/plugins/content/jdownloads/jdownloads/css/mos_jdownloads_file.css" type="text/css" />
   <link rel="stylesheet" href="https://-=MYSYTE=-/components/com_jdownloads/assets/css/jdownloads_fe.css" type="text/css" />
   <link rel="stylesheet" href="https://-=MYSYTE=-/components/com_jdownloads/assets/css/jdownloads_buttons.css" type="text/css" />
   <link rel="stylesheet" href="https://-=MYSYTE=-/plugins/content/jdownloads/jdownloads/lightbox/lightbox.css" type="text/css" />
   <link rel="stylesheet" href="https://-=MYSYTE=-/components/com_jdownloads/assets/css/jdownloads_custom.css" type="text/css" />
   
   
   <script src="https://-=MYSYTE=-/plugins/content/jdownloads/jdownloads/lightbox/lightbox.js" type="text/javascript"></script>
   <script src="https://-=MYSYTE=-/components/com_jdownloads/assets/flowplayer/flowplayer-3.2.12.min.js" type="text/javascript"></script>

May be because of it there're notices.
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 25.09.2016 14:08:55
1145 and 1482 lines are:


$mp3_info = '<div class="jd_mp3_id3tag_wrapper" style="max-width:'.(int)$jlistConfig['html5player.audio.width'].'px; ">'.stripslashes($jlistConfig['mp3.info.layout']).'</div>';

$mp3_info = '<div class="jd_mp3_id3tag_wrapper" style="max-width:'.(int)$jlistConfig['html5player.audio.width'].'px; ">'.$mp3_info.'</div>';
   


Guys, what is it?? What is the html5player?
In the configuration in the mediaplayer tab I set all options to 'No'.
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 26.09.2016 12:10:29
Hello?
Should I erase 1434-1486 lines from the /plugins/content/jdownloads/jdownloads.php in a waiting of the next version of jDownloads 3.2?


if ($jlistConfigM['mp3.view.id3.info'] && $files->itemtype == 'mp3' && !$extern_media){
           // read mp3 infos
            if ($is_preview){
                // get the path to the preview file
                $mp3_path_abs = $jlistConfigM['files.uploaddir'].'/'.$jlistConfigM['preview.files.folder.name'].'/'.$files->preview_filename;
            } else {
                // get the path to the downloads file
                $mp3_path_abs = $jlistConfigM['files.uploaddir'].'/'.$category_dir.'/'.$files->url_download;
            }
            $info = JDHelper::getID3v2Tags($mp3_path_abs);
            if ($info){
                // add it
                $mp3_info = '<div class="jd_mp3_id3tag_wrapper" style="max-width:'.(int)$jlistConfig['html5player.audio.width'].'px; ">'.stripslashes($jlistConfig['mp3.info.layout']).'</div>';
                $mp3_info = str_replace('{name_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_TITLE'), $mp3_info);
                if ($is_preview){
                    $mp3_info = str_replace('{name}', $files->preview_filename, $mp3_info);
                } else {
                    $mp3_info = str_replace('{name}', $files->url_download, $mp3_info);
                }
                $mp3_info = str_replace('{album_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_ALBUM'), $mp3_info);
                if (isset($info['TALB'])) {
                    $mp3_info = str_replace('{album}', $info['TALB'], $mp3_info);
                } else {
                    $mp3_info = str_replace('{album}', '', $mp3_info);
                }   
                $mp3_info = str_replace('{artist_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_ARTIST'), $mp3_info);
                if (isset($info['TPE1'])) {
                    $mp3_info = str_replace('{artist}', $info['TPE1'], $mp3_info);
                } else {
                    $mp3_info = str_replace('{artist}', '', $mp3_info);
                }   
                $mp3_info = str_replace('{genre_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_GENRE'), $mp3_info);
                if (isset($info['TCON'])) {
                    $mp3_info = str_replace('{genre}', $info['TCON'], $mp3_info);
                } else {
                    $mp3_info = str_replace('{genre}', '', $mp3_info);
                }   
                $mp3_info = str_replace('{year_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_YEAR'), $mp3_info);
                if (isset($info['TYER'])) {
                    $mp3_info = str_replace('{year}', $info['TYER'], $mp3_info);
                } else {
                    $mp3_info = str_replace('{year}', '', $mp3_info);                 
                }   
                $mp3_info = str_replace('{length_title}', JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_LENGTH'), $mp3_info);
                if (isset($info['TLEN'])) {
                    $mp3_info = str_replace('{length}', $info['TLEN'].' '.JText::_('COM_JDOWNLOADS_FE_VIEW_ID3_MINS'), $mp3_info);
                } else {
                    $mp3_info = str_replace('{length}', '', $mp3_info);
                }
                $mp3_info = '<div class="jd_mp3_id3tag_wrapper" style="max-width:'.(int)$jlistConfig['html5player.audio.width'].'px; ">'.$mp3_info.'</div>';
                $l_Template = str_replace('{mp3_id3_tag}', $mp3_info, $l_Template);
            }     
        }
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: ColinM on 27.09.2016 01:22:31
Antar
Have only just seen your notes.

Query 1
Have you set you Debug level up higher or have you changed the version of php on your server?

Query 2
I presume you have jD installed.  So the jd related css and js files are loaded as part of the system.  This is usual for all components even if you have no user jD related menus or similar.  You could just use the admin (backend) and they are needed there as well.

Query 3
The html5 player relates to the code that plays video and audio.  The $mp3_info is additional information that may optionally be included in an mp3 audio file.  It will be shown on the front end if you have  {mp3_id3_tag} in your Files layout.  If you have not attached an mp3 file as a preview it will do nothing.
You are looking perhaps at the jD source code which typically has conditional statements arould them.  But I have not checked.  Maybe you could advise where you saw those lines listed.
This mp3 info is nothing to do with your error messages.

Query 4
The short answer is No.  There are lines in the code that are checking if you have an mp3 file as a preview.  Note thast if you added an mp3 file as the Downloadable file then there is an option to automatically use it as a preview as well as that was requested by many users.
If you do not want to see ther generated code for mp3 info then remove the placeholder   {mp3_id3_tag} in your Files layout - make a copy of layout and edit that and use as active one.  Also I think   {mp3_id3_tag} is in the Download Details layout so remove from there as well.  The reason for using a copy is that on the next update the standard layouts may be updated. See
http://www.jdownloads.net/documentations/item/editing-a-layout

Colin

Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 27.09.2016 08:06:54
Unfortunately, it works. When I deleted these lines errors gone.
I saw this notices in strange places, not everywhere but only in one joomla tag listing and in one joomla category listing. May be in the second but I'm not sure - if it's needed I'll uncomment what I've deleted.

So what I would say, yes, engine loads jD css and js into META but why it doing randomly? Not in all pages and not exactly where it needed?

Also, I don't use any {mp3_*} tags on the site.
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: ColinM on 27.09.2016 12:12:19
Hi
Have not been able to reproduce your results so far. Did not know that this was happening 'at random'.  Experience shows that some 'bugs' cause apparently irrational behaviour as the code is not expecting or has not tested for a particular combination.  The challenge is reproducing it in a consistent manner.
It would help if you could kindly answer all the queries below as it will help our understanding, and hopefully the resolution.

1. Have you uploaded an MP3 audio file as a Download?
2. Have you added an MP3 file as a Preview file?
3. In the Tags and Category where you saw the problem does it always occur in those two instances?
4. Can you please send an image, or set of images,  of the Config - Media tab options you have so I can be sure I am setting the same as yourself.
5. Which version of Joomla! are you using?
6. Which version of jDownloads are you using?
7. Are you saying you have edited all activated Files and Download Details Layouts to remove placeholders {mp3_player} {preview_player} {preview_url}and {mp3_id3_tag}?  NB {preview_player} is the newer version of {mp3_player} as jD now supports more than just mp3 audio files

8. Are you using the <div based (v32) or the <table based (v25) layouts?

Thanks
Colin

Colin
PS note wh
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 27.09.2016 12:40:56
Well, I could give you an administration access and a pair of links where the problem occurs. Do it?
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: ColinM on 27.09.2016 13:08:01
Antar,
That would be fine by PM,   I can see the setup and layouts that way but answering some of theotherr questions would save me some time!!
Colin
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 30.09.2016 09:33:09
Hello? Three days gone.  ???
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Arno on 14.10.2016 11:28:27
QuoteJdownloads suddenly start showing notices where there never been notice at all. For example, in the Joomla tag list view or in the Joomla category view. This lines:
You have found a bug. Sorry for the circumstances.
It must be: $jlistConfigM instead $jlistConfig

Please use the unzipped file below and copy it to /plugins/content/jdownloads/

Had Colin checked in the meantime your jD installation and your settings?

(Bug fixed in 3.2.47)

[gelöscht durch Administrator]
Title: Re: Jdownloads suddenly start showing notices where there never been notice at all
Post by: Antar on 14.10.2016 12:00:24
Thank you! It works!




No, I didn't see Colin logins. Well I think I'll remove temporary accounts which I send him.