article plugin problem: Notice: Array to string conversion

futuron

Member
Hi i've updated a site and now have issues with this.
J!3.6.2 / Fabrik todays' github

I have a form that contains a repeatable group. In that group is a dropdown 'location'

In the template i use to create the article:

$workshop_locatie = $this->data['fab_content_vvm_workshops_29_repeat___locatie'];
echo "<i class=\"uk-icon uk-icon-location-arrow\"></i>" . $workshop_locatie[$key] . "<br>\n";

Result in article: Notice: Array to string conversion in /home/vvmindfu....
 
Where is $key set?

Before the echo, do ...

Code:
var_dump($workshop_locatie, $key); exit;

... and paste the output here.

-- hugh
 
array(2) { [0]=> array(1) { [0]=> string(10) "Nieuwegein" } [1]=> array(1) { [0]=> string(9) "Den Bosch" } } int(0)
 
Code:
<?php
/**
* @package     Joomla.Plugin
* @subpackage  Fabrik.form.email
* @copyright   Copyright (C) 2005-2013 fabrikar.com - All rights reserved.
* @license     GNU/GPL http://www.gnu.org/copyleft/gpl.html
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

$workshop_datum = $this->data['fab_content_vvm_workshops_29_repeat___datum_workshop'];
$workshop_locatie = $this->data['fab_content_vvm_workshops_29_repeat___locatie'];
$workshop_tijd = $this->data['fab_content_vvm_workshops_29_repeat___tijd'];


?>



<div class="uk-grid workshop_voor_door_leden">
    <div class="uk-width-2-3 uk-panel uk-panel-space"><h1 >{titel_workshop}</h1>
<h3 ><i class="uk-icon uk-icon-user"></i> {docent}</h3>

{main}

<p><a class="btn btn-primary uk-margin-right" href="/workshops/" target="_blank">Inschrijven</a>
<a class="btn btn-secondary" href="/activiteiten/workshops-vvm">Terug naar overzicht VVM-workshops</a></p>


<div class="uk-alert">
{intro}
</div>

  </div>
    <div class="uk-width-1-3 uk-panel uk-panel-box">
   
   
  <h2>Data en locatie</h2>
  <?php
foreach ($workshop_datum as $key => $value){
    // echo var_dump($workshop_locatie, $key); exit;
    echo "<p>";
    echo "<i class=\"uk-icon uk-icon-calendar\"></i>" . $workshop_datum[$key] . "<br>\n";
    echo "<i class=\"uk-icon uk-icon-location-arrow\"></i>" . $workshop_locatie[$key] . "<br>\n";
    echo "<i class=\"uk-icon uk-icon-clock-o\"></i>" . $workshop_tijd[$key] . "<br>\n";
      echo "</p>\n";
    }

?>
   
        <p>
<a href="#vvmworkshopinfo" data-uk-modal>Overige informatie <i class="uk-icon uk-icon-info-circle"></i></a></p>


  </div>
</div>


<!-- This is the modal -->
<div id="vvmworkshopinfo" class="uk-modal">
    <div class="uk-modal-dialog">
        <a class="uk-modal-close uk-close"></a>
{article VVM-workshops, voor leden, door leden}<h3>{title}</h3> {text}{/article}
    </div>
</div>
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top