Andy
|
Hi Everybody,
I have used the latest version of Artisteer to create a Drupal 7. It was working perfectly, until I installed the Plupload intergration module (I think), and now I when I visit the gallery page (/galleries), it just comes up as text and I get the following error at the bottom of the page:
Quote :Fatal error: Cannot use object of type stdClass as array in /home/myaccname/public_html/D7GFx/sites/all/themes/D7GFx/drupal7_theme_methods.php on line 229
I have looked in this file, and found that on line 229 it is opening statement for the node preview function, so I could see anything wrong with the code. However, I don't know if the error message includes blank lines, and more to the point, I don't really know what I'm looking at! Anyhow, please see the D7GFx_node_preview function below:
function D7GFx_node_preview($variables) {
$node = $variables['node'];
$output = '<div class="preview">';
$preview_trimmed_version = FALSE;
$elements = node_view(clone $node, 'teaser');
$trimmed = drupal_render($elements);
$elements = node_view($node, 'full');
$full = drupal_render($elements);
// Do we need to preview trimmed version of post as well as full version?
if ($trimmed != $full) {
drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication.<span class="no-js"> You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.</span>'));
$preview_trimmed_version = t('Preview trimmed version');
$output .= <<< EOT
<div class="drew-post">
<div class="drew-post-body">
<div class="drew-post-inner drew-article">
<div class="drew-postcontent">
<h3>
$preview_trimmed_version
</h3>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
EOT;
$output .= $trimmed;
$preview_full_version = t('Preview full version');
$output .= <<< EOT
<div class="drew-post">
<div class="drew-post-body">
<div class="drew-post-inner drew-article">
<div class="drew-postcontent">
<h3>
$preview_full_version
</h3>
</div>
<div class="cleared"></div>
</div>
<div class="cleared"></div>
</div>
</div>
EOT;
$output .= $full;
}
else {
$output .= $full;
}
$output .= "</div>\n";
return $output;
So, if anybody can point me in the right direction, or provide me with the full solution to my problem, please let me know as soon as possible; - I would be very grateful!
Thanks in Advance,
Andy
|