Undefined offset: 0 in include() (line 35...) error in portofolio section

David Franken's picture
David Franken
Sat, 09/26/2015 - 14:12
#1
Undefined offset: 0 in include() (line 35...) error in portofolio section

Hi, 

After editing the portfolio section; i noticed that i get some notice errors when i click on Launch project.

Also when i view the site on a mobile phone, it see the error when scroll to the right, that should normally not be possible, but now it is due to the error that is shown.

Image title

Thank you in advance,

regards,

david

phuonght's picture
phuonght
Mon, 09/28/2015 - 03:30

Hi,

Just checked your site and see no error. Would you like to check it again?

David Franken's picture
David Franken
Mon, 09/28/2015 - 03:37

Hi,

yes i disabled the errors being showd on the website. i just enabled it again; you can check it again.

I get it everywhere; in portfolio when ik click launch project or in the blog section.

phuonght's picture
phuonght
Mon, 09/28/2015 - 06:29

David,

Please open file views-view-fields--portfolio.tpl.php, line 34, after "else", insert: 

if (isset($multimedia[0]['rendered']['#file']->type))

David Franken's picture
David Franken
Mon, 09/28/2015 - 14:52

Like this?:

<?php
    $multimedia = $row->field_field_portfolio_multimedia;
    $icon_type = '';
    $portfolio_type = '';
    if(isset($multimedia) && count($multimedia) > 1 ) {
        $icon_type = $icon_type = '<i class="fontello icon-menu"></i>';
        $portfolio_type  = t('Gallery Project');
    } else {
       if (isset($multimedia[0]['rendered']['#file']->type)) 
        $file_type = $multimedia[0]['rendered']['#file']->type;
        if($file_type == 'video') {
            $icon_type = '<i class="fontello icon-youtube-play"></i>';
            $portfolio_type  = t('Video Project');

After that i get different errors :(

phuonght's picture
phuonght
Wed, 09/30/2015 - 00:54

We will check it again and reply you soon :)

David Franken's picture
David Franken
Wed, 09/30/2015 - 09:42

thanks!

phuonght's picture
phuonght
Mon, 10/05/2015 - 23:17

Hi David,

Sorry for our delay.

It is not

   } else {
if (isset($multimedia[0]['rendered']['#file']->type))

but

} elseif (isset($multimedia[0]['rendered']['#file']->type)) {

Please try again and check if it works.

David Franken's picture
David Franken
Tue, 10/06/2015 - 03:56

Hi Phuonght,

No problem regarding the delay.

I tried it and it looks now a little bit better, but now only a new error appeared. 

Notice: Undefined index: name in include() (line 70 of /var/www/html/drupal/sites/www.franken.pro/themes/md_chulan/template/views/blog/views-view-fields--...).

Notice: Trying to get property of non-object in include() (line 70 of /var/www/html/drupal/sites/www.franken.pro/themes/md_chulan/template/views/blog/views-view-fields--...).

phuonght's picture
phuonght
Tue, 10/06/2015 - 04:16

Sorry but we can not access by FTP account. Could you check it again? We would like to fix error for you.

David Franken's picture
David Franken
Tue, 10/06/2015 - 04:33

Hi, Sorry; yes that it true; i disabled it because of all the brute force hack attempts; i will open it now; please try again after 5 minutes from this post :)

phuonght's picture
phuonght
Tue, 10/06/2015 - 05:00

Check your site please. It is done :)

David Franken's picture
David Franken
Tue, 10/06/2015 - 05:26

wow! great it works again! thanks again!

David Franken's picture
David Franken
Wed, 10/07/2015 - 16:01

oh no! i got the error back! i noticed it got back when i published a new blog content page. It's back again :(

phuonght's picture
phuonght
Thu, 10/08/2015 - 06:25

Hi David, 

We can not access FTP again.

David Franken's picture
David Franken
Thu, 10/08/2015 - 06:59

Hi Phuonght,

Yes, i disabled the access and permit only access from known IP"s because i get arround 20 brute force attempts per day :)

Please send me you pub IP so that i can whitelist it :)

thanks

regards,

david

phuonght's picture
phuonght
Thu, 10/08/2015 - 07:06

Our ip: 117.5.88.33

David Franken's picture
David Franken
Thu, 10/08/2015 - 07:17

Hi,

Done, please try again.

Regards

David

phuonght's picture
phuonght
Thu, 10/08/2015 - 23:00

Please check it again. We just fixed.

David Franken's picture
David Franken
Sat, 10/10/2015 - 14:50

Yep checked and is fixed; i hope it stays fixed when i add a new blog page.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.