Note that there are some explanatory texts on larger screens.

plurals
  1. POMy site has been crash when i add some php code
    primarykey
    data
    text
    <p>My site has been crash when i add these php code in index.php in template folder:</p> <pre><code>&lt;?php if (!class_exists( 'VmModel' )) require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'vmmodel.php'); if (!class_exists( 'VmConfig' )) require_once(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php'); if(!class_exists('VirtueMartCart')) require_once(JPATH_VM_SITE.DS.'helpers'.DS.'cart.php'); $hv_cart = VirtueMartCart::getCart(true); foreach( $hv_cart-&gt;products as $pkey =&gt;$prow ){?&gt; &lt;li class="ui-widget-content ui-corner-tr" style="width: 48px;"&gt; &lt;?php echo $prow-&gt;image-&gt; displayMediaThumb('style="height: 36px; width: 100%"',false); ?&gt; &lt;span&gt;SL:&lt;?php echo $prow-&gt;quantity; ?&gt;&lt;/span&gt; &lt;span class="hv_hidden" product_id="&lt;?php echo $prow-&gt;virtuemart_product_id; ?&gt;" quantity="&lt;?php echo $prow-&gt;quantity; ?&gt;"&gt; &lt;/span&gt; &lt;/li&gt; &lt;?php } ?&gt; </code></pre> <p>when i visit homepage the server show error:</p> <blockquote> <p>Fatal error: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;VmImage&quot; of the object you are trying to operate on was loaded <em>before</em> unserialize() gets called or provide a __autoload() function to load the class definition in C:\xampp\htdocs\chovietnam.com\templates\it_thestore4\index.php on line 68</p> </blockquote> <p>line 68 make error is</p> <pre><code>&lt;?php echo $prow-&gt;image-&gt; displayMediaThumb('style="height: 36px; width: 100%"',false); ?&gt; </code></pre> <p>the first time i visit homepage it still work well, but when i visit home page again, it make error. And i clear all cookie, cache... of browser it will ok again and make error when i visit homepage again. but if i visit other page (not homepage, and those code still work in that page) there is no error appear anyone can help me solve this problem, i use Joomla 2.5 and Virtuemart 2. thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload