0
votes

I have a problem on my Magento 1.6.2

When i make a basic shipment in the back-end of a other everything works well.

But when i want to add a trackingnumber and i click on send magento displays a white screen. Firebug says: 500 Internal Server Error

The url with the white screen: /index.php/admin/sales_order_shipment/save/order_id/293/key/KEYNUMBER/

Can anyone help me? Because i would like to use this future too ...

UPDATE: Errorlog:

PHP Fatal error:  Call to a member function getStoreId() on a non-object in /var/www/vhosts/liefstoereigenwijs.nl/magento-test/app/code/community/Vianetz/AdvancedInvoiceLayout/Model/Order/Pdf/Shipment.php on line 24
PHP Warning:  spl_autoload(): open_basedir restriction in effect. File(mage.inc) is not within the allowed path(s): (/var/www/vhosts/liefstoereigenwijs.nl/:/tmp/) in /var/www/vhosts/liefstoereigenwijs.nl/magento-test/app/code/core/Mage/Core/functions.php on line 244
PHP Warning:  spl_autoload(): open_basedir restriction in effect. File(mage.php) is not within the allowed path(s): (/var/www/vhosts/liefstoereigenwijs.nl/:/tmp/) in /var/www/vhosts/liefstoereigenwijs.nl/magento-test/app/code/core/Mage/Core/functions.php on line 244
PHP Fatal error:  Class 'Mage' not found in /var/www/vhosts/liefstoereigenwijs.nl/magento-test/app/code/core/Mage/Core/functions.php on line 0

A piece of the Advanced Invoice layout file:

<?php
/**
 * AdvancedInvoiceLayout Order Shipment PDF model
 *
 * @category   Vianetz
 * @package    Vianetz_AdvancedInvoiceLayout
 * @author     Christoph Massmann <[email protected]>
 * @license    http://www.vianetz.com/license
 */
class Vianetz_AdvancedInvoiceLayout_Model_Order_Pdf_Shipment extends Vianetz_AdvancedInvoiceLayout_Model_Order_Pdf_Abstract
{
    public function getPdf($shipments = array())
    {   
        $this->_beforeGetPdf();
        $this->_initRenderer('shipment');

        $this->pdf = new Zend_Pdf();
        $style = new Zend_Pdf_Style();
        $this->_setFontBold($style, 10);

        foreach ($shipments as $shipment) {
            if ($shipment->getStoreId()) {
                Mage::app()->getLocale()->emulate($shipment->getStoreId());
                Mage::app()->setCurrentStore($invoice->getStoreId());
            }
            $this->page = $this->_newPage($this->pdf, $shipment->getStore());

            $order = $shipment->getOrder();

            Mage::helper('advancedinvoicelayout')->loadConfig($this, $shipment->getStore());

Line 24 is:

Mage::app()->setCurrentStore($invoice->getStoreId());

Can anyone tell me what is wrong?

2
A 500 server error means there was a fatal PHP that stopped the request from finishing. Check your server logs. - Alan Storm
That is a commercial extension so you should contact the authors (Vianetz) and report the bug. It isn't in Stack Overflow's power to fix proprietary code. Besides it clearly doesn't assign $invoice before being used, it is broken. - clockworkgeek

2 Answers

0
votes

PHP is running out of memory, Magento requires at least 256MB. Check what is currently configured by creating then viewing a PHP file that says:

<?php phpinfo();

Magento's default .htaccess file sets the memory limit to 256MB. If that is not taking effect then you need to modify the server's php.ini file instead. If the limit is correct then try increasing it a bit more.

0
votes

I have filed a bug report at Vianetz. Thank you all for helping me in the right direction.