Hi there,
I bought the modular Shuffle Theme from @aristotheme (http://aristotheme.com/shufflemodule/) and added my first webpage. Whenever I try to preview the webpage, I get the following error:
syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF)
I did everything as described in their help videos. The Theme works with different modules but whatever module I use, the error stays the same.
Here is a better picture of it:
Is there anything I could do?
Could you post the complete code of the file in the error screenshot, nv-002.html.php
. The error message says what the error is, i.e. an if-statement without a closing endif, but since not all the code is visible…
sorry, wasn’t thinking. here is the code:
<?php
// nested menu
$items = $pages->visible();
?>
<!--
// Name: NV-002
// Description: Logo, Center Menu and Social Icon Button Links
// ========================================================================
-->
<div id="<?= $module->uid() ?>" class="nv-002 <?= $module->uid() ?> uk-position-relative" style="z-index: 980;">
<div class="<?php if($module->transparent() == 'yes'): ?> <?= $module->margintop() ?> uk-position-top <?php endif ?> <?= $module->boxshadow() ?>" <?php if($module->stickymenu() == 'no'): ?>uk-parallax="opacity: <?= $module->menuopacitystart() ?>, <?= $module->menuopacitymiddle() ?>, <?= $module->menuopacityend() ?>; viewport: <?= $module->menuviewport() ?>; easing: <?= $module->menueasing() ?>; y: <?= $module->menuyaxisstart() ?>, <?= $module->menuyaxismiddle() ?>, <?= $module->menuyaxisend() ?> ; media: @m" <?php endif ?>>
<div <?php if($module->stickymenu() == 'yes'): ?> uk-sticky="show-on-up: true; animation: <?= $module->stickyanimations() ?>; sel-target: .nv-002-container; cls-active: nv-002-active; cls-inactive: nv-002-inactive; top: <?= $module->stickytop() ?>; media: @m" <?php endif ?>>
<nav class="nv-002-container <?php if($module->transparent() == 'no'): ?>nv-002-bgcolor<?php endif ?>">
<div class="uk-container <?= $module->container() ?>">
<div class="uk-navbar <?php if($module->space() == 'true'): ?>uk-padding-large<? endif ?> uk-padding-remove-vertical">
<div class="uk-navbar-left">
<?php if($image = $module->brandlogo()->toFile()): ?>
<a class="uk-navbar-item uk-logo dim" href="<?= url() ?>">
<img src="<?= $image->url() ?>" width="" height="" alt="<?php echo $site->title()->html() ?>" uk-icon uk-svg >
</a>
<?php else: ?>
<a class="uk-navbar-item uk-logo dim" href="<?= url() ?>">
<h1 class="f4 f3@m fw7 uk-margin-remove <?= str::slug($site->headlineff()->html()) ?>"><?= $module->brandname() ?></h1>
</a>
<?php endif ?>
</div>
<div class="uk-navbar-center uk-visible@m navbar-menu-style-1">
<ul class="uk-navbar-nav">
<?php foreach($items as $item): ?>
<li class="<?php e($item->isOpen(), 'uk-active fw4') ?> <?= str::slug($site->headlineff()->html()) ?> f4 fw3 uk-margin-medium-left">
<a href="<?php echo $item->url() ?>"><?= $item->title()->html() ?></a>
</li>
<?php endforeach ?>
</ul>
</div>
<div class="uk-navbar-right uk-visible@m">
<ul class="uk-grid-small" uk-grid>
<?php foreach($module->sociallinks()->toStructure() as $item): ?>
<li>
<a class="uk-icon-button" href="<?php echo $item->link() ?>" target="_blank" uk-icon="icon: <?php echo $item->title() ?>"></a>
</li>
<?php endforeach ?>
</ul>
</div>
<div class="uk-navbar-right uk-hidden@m nr2">
<a class="uk-navbar-toggle dim" uk-navbar-toggle-icon type="button" uk-toggle="target: #<?= $module->mobilemenu() ?>"></a>
</div>
</div>
</div>
</nav>
</div>
</div>
</div>
<style>
/* Normal -------------- */
.<?= $module->uid() ?> .uk-logo {
color: <?= $module->logocolor() ?>;
}
.<?= $module->uid() ?> .uk-navbar-nav> li > a,
.<?= $module->uid() ?> .uk-navbar-toggle {
color: <?= $module->fontcolor() ?>;
}
.<?= $module->uid() ?> .nv-002-bgcolor {
background-color: <?= $module->bgcolor() ?>;
}
/* Button*/
.<?= $module->uid() ?> .uk-icon-button {
background: <?= $module->iconbgcolor() ?>;
color: <?= $module->iconcolor() ?>;
}
.<?= $module->uid() ?> .uk-icon-button:hover,
.<?= $module->uid() ?> .uk-icon-button:focus {
background-color: <?= $module->iconbghovercolor() ?>;
color: <?= $module->iconhovercolor() ?>;
}
.<?= $module->uid() ?> .uk-icon-button:active,
.<?= $module->uid() ?> .uk-active > .uk-icon-button {
background-color: <?= $module->iconbghovercolor() ?>;
color: <?= $module->iconhovercolor() ?>;
}
/* For Sticky --------------*/
.nv-002-active {
background: <?= $module->stickybgcolor() ?>
}
.nv-002-active .uk-logo {
color: <?= $module->stickylogocolor() ?>;
}
.nv-002-active .uk-navbar-nav > li > a,
.nv-002-active .uk-navbar-toggle {
color: <?= $module->stickyfontcolor() ?>;
}
.nv-002-bgcolor.nv-002-active {
background-color: <?= $module->stickybgcolor() ?>
}
.nv-002-active .uk-icon-button {
background: <?= $module->iconstickybgcolor() ?>;
color: <?= $module->iconstickycolor() ?>;
}
.nv-002-active .uk-icon-button:hover,
.nv-002-active .uk-icon-button:focus {
background: <?= $module->iconstickybghovercolor() ?>;
color: <?= $module->iconstickyhovercolor() ?>;
}
.nv-002-active .uk-icon-button:active,
.nv-002-active .uk-active > .uk-icon-button {
background: <?= $module->iconstickybghovercolor() ?>;
color: <?= $module->iconstickyhovercolor() ?>;
}
</style>
<!-- NV-002 End =============================-->
Hm, there doesn’t seem to be an error in that file.
I think you should contact the developer of that theme.
thank you for your help! glad that there is at least no error in that file.
Hi JayJay
Please update your PHP to 7.1 also
Issue seems to be the short opening tag. And short_open_tag = ON (should be) in your php.ini file
short_open_tag is On, and php is 7.1 
@aristotheme It is usually not recommended to use short open tags (the short echo tags are ok), especially not in code that you are not only using yourself. I didn’t see this at first, but it seems a bit strange to me that you mix standard php open tags and short open tags?
<nav class="nv-002-container <?php if($module->transparent() == 'no'): ?>nv-002-bgcolor<?php endif ?>"><!--HERE YOU USE A STANDARD PHP OPEN TAG-->
<div class="uk-container <?= $module->container() ?>">
<div class="uk-navbar <?php if($module->space() == 'true'): ?>uk-padding-large<? endif ?>uk-padding-remove-vertical"><!-- HERE YOU USE A SHORT PHP OPEN TAG -->
1 Like