• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Diverse "Undefined" meldingen
PostPosted: Sat Sep 09, 2017 2:20 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1726
Location: The Netherlands
Op de home page van http://www.uisge-beatha.eu zie ik een aan "Undefined" meldingen staan waar ik niet van kan herleiden hoe deze worden veroorzaakt.

Bij het formulier aan de rechterzijde staat:
Quote:
Notice: Undefined property: stdClass::$op in /home/efacti/public_html/uisge-beatha.eu/www/tmp/templates_c/FormBuilder^9db23e6ee0195e4a588736dbb2b17d8c7ee8ce05_0.module_db_tpl.FormBuilder;fb_8.php on line 110

De 'notice' lijkt te worden veroorzaakt door de gekleurde regel:
Code:
   {section name=numloop loop=$entry->input}
               {if $entry->label_parts == 1}
                                        {*   <div>{$entry->input[numloop]->input}&nbsp;{$entry->input[numloop]->name}</div> *}
                                                <div>{if isset($entry->input[numloop]->input)}&nbsp;{$entry->input[numloop]->name}{/if}</div>
               {else}
                  {$entry->input[numloop]->input}
               {/if}
               [color=#0040BF]{if isset($entry->input[numloop]->op) && $entry->input[numloop]->op}{$entry->input[numloop]->op}{/if}[/color]
            {/section}
         {else}
            {if $entry->valid == 0}<div class="formbuilder_field_error">{/if}
               {if $entry->smarty_eval == '1'}{eval var=$entry->input}{else}{$entry->input}{/if}
            {if $entry->valid == 0}</div>{/if}
         {/if}

Hoe kan ik deze melding oplossen?

Het andere dat opvalt is dat er in de social media buttons een "Undefined index" melding zit (als vb de "Delen"-knop gebruikt)
Quote:
<a class="_2vmz" href="/sharer/sharer.php?u=https%3A%2F%2Fwww.uisge-beatha.eu%2F%253Cbr%2520%2F%253E%253Cb%253ENotice%253C%2Fb%253E%3A%2520%2520Undefined%2520index%3A%2520canonical%2520in%2520%253Cb%253E%2Fhome%2Fefacti%2Fpublic_html%2Fuisge-beatha.eu%2Fwww%2Ftmp%2Ftemplates_c%2Fc95cce29cd761e36814a9e38e7d77b7b9237ac49_0.cms_template.shareFacebook.php%253C%2Fb%253E%2520on%2520line%2520%253Cb%253E27%253C%2Fb%253E%253Cbr%2520%2F%253E%253Cbr%2520%2F%253E%253Cb%253ENotice%253C%2Fb%253E%3A%2520%2520Trying%2520to%2520get%2520property%2520of%2520non-object%2520in%2520%253Cb%253E%2Fhome%2Fefacti%2Fpublic_html%2Fuisge-beatha.eu%2Fwww%2Ftmp%2Ftemplates_c%2Fc95cce29cd761e36814a9e38e7d77b7b9237ac49_0.cms_template.shareFacebook.php%253C%2Fb%253E%2520on%2520line%2520%253Cb%253E27%253C%2Fb%253E%253Cbr%2520%2F%253E&amp;display=popup&amp;ref=plugin&amp;src=like&amp;kid_directed_site=0&amp;app_id=175931732519501" target="_blank" id="u_0_4"><button type="submit" class="inlineBlock _2tga _49ve" id="u_0_5"><div class="_2n-v"><span class="_49vh _2pi7">Delen</span></div></button></a>


In de default template wordt canonical als volgt gedefinieerd:
Code:
    {$canonical = $canonical|default:"{$content_obj->GetURL()|default:''}" scope=global}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Diverse "Undefined" meldingen
PostPosted: Mon Sep 11, 2017 8:20 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1726
Location: The Netherlands
Voor de canonical lijkt de oplossing om in de template "shareFacebook" te controleren of de variabele canonical bestaat:
Code:
{if !(isset($canonical))}
  {$canonical = {$content_obj->GetURL()}}
{/if}
<div class="fb-like" data-href="{$canonical}" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>


In de default template van de pagina staat:
Code:
    {$canonical = $canonical|default:"{$content_obj->GetURL()|default:''}" scope=global}

Is er iets dat ik over het hoofd zie waarom canonical niet in alle templates te gebruiken zonder dat het notices leidt?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Diverse "Undefined" meldingen
PostPosted: Mon Sep 11, 2017 11:39 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 2875
Location: The Netherlands
In een productieomgeving zouden die notices niet weergegeven moeten worden. Dat zou je op je hosting-omgeving/.htaccess/...? uit moeten kunnen zetten.

Ik zou er niet al te lang bij stil blijven staan.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Diverse "Undefined" meldingen
PostPosted: Tue Sep 12, 2017 6:17 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Thu Mar 23, 2006 9:25 am
Posts: 1726
Location: The Netherlands
Dank je Velden. Het intrigeert me waar die meldingen vandaan komen, vandaar de vraag.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
HostPapa CMS Made Simple hosting