Debugging card generator

You hit this file from the front end
Listing ID is: 990 - which is there(!), not empty and numerical
Setting security _GET whitelist: ('id','lang','header','size','sticker','extended','password','feature')
No lang is set so defaulting to _en_GB
Size is set to:
Feature is set to:
Eco-sold is set to:

Setting some basic variables

$siteurlhttps://www.sapphireproperties.co.uk
$basepath/var/www/vhosts/sapphireproperties.co.uk/httpdocs
$template_name (as constructed from db set name, plus any other parameters)sapphire
Because we have a lang set, I have reconstructed the siteurl (for the QR mostly) to: https://www.sapphireproperties.co.uk
Query to get class name succeeded - It's: For sale
Query to get property details succeeded

Starting descriptions

Let's have a closer look at the EN description BEFORE processing:

<p>Great south facing apartment in the Mar Azul area of Torrevieja. This 2nd floor apartment consists of&nbsp;a spacious lounge with dining area and&nbsp;open kitchen with a range of wall and base units, a good sized double bedroom with fitted wardrobes and a bathroom. The south facing balcony is accessed from the lounge and benefits from&nbsp;the sun all day, with views towards the sea and mountains.&nbsp;</p>

<p>The property is in a complex of apartment blocks on which there is an independent bar which has a pool that can be used by the residents for a small fee.&nbsp; Each of the blocks is serviced by an elevator.</p>

<p>The apartments are ideally situated with&nbsp;a number of bars, shops and restaurants&nbsp;in the vicinity with&nbsp;the nearest supermarket being&nbsp;less than a 10 minute walk away. The sea is less than a 5 minute walk&nbsp;from the property, and Lo Ferris beach is&nbsp;around 10 minutes. There are two buses an hour to the centre of Torrevieja or if you would prefer to walk, you can reach the marina and town centre in under half an hour.&nbsp;</p>

<p>Both Alicante and Murcia airports can be reached in less than 45 minutes by car.</p>

...and AFTER processing:

Great south facing apartment in the Mar Azul area of Torrevieja. This 2nd floor apartment consists of a spacious lounge with dining area and open kitchen with a range of wall and base units, a good sized double bedroom with fitted wardrobes and a bathroom. The south facing balcony is accessed from the lounge and benefits from the sun all day, with views towards the sea and mountains. The property is in a complex of apartment blocks on which there is an independent bar which has a pool that can be used by the residents for a small fee. Each of the blocks is serviced by an elevator. The apartments are ideally situated with a number of bars, shops and restaurants in the vicinity with the nearest supermarket being less than a 10 minute walk away. The sea is less than a 5 minute walk from the property, and Lo Ferris beach is around 10 minutes. There are two buses an hour to the centre of Torrevieja or if you would prefer to walk, you can reach the marina and town centre in under half an hour. Both Alicante and Murcia airports can be reached in less than 45 minutes by car.

Let's have a closer look at the ES description BEFORE processing:

<p>&nbsp;</p>

<p>Bonito apartamento con orientaci&oacute;n sur , ubicado en la zona de Mar Azul , Torrevieja. El apartamento esta en el segundo piso y consta de un amplio sal&oacute;n/comedor con cocina americana&nbsp;amueblada, un dormitorio doble de buen tama&ntilde;o con armarios empotrados y un ba&ntilde;o. Se accede al balc&oacute;n desde el sal&oacute;n y se beneficia del sol durante todo el d&iacute;a, con vistas hacia el mar y las monta&ntilde;as.</p>

<p>&nbsp;</p>

<p>La propiedad se encuentra en un complejo de apartamentos donde&nbsp;hay un bar-restaurante con&nbsp;piscina &nbsp;que puede ser utilizado&nbsp;por&nbsp; los vecinos a un peque&ntilde;o coste. Cada bloque se beneficia de ascensor.</p>

<p>&nbsp;</p>

<p>Los apartamentos gozan de una ubicaci&oacute;n ideal con numerosos bares, tiendas y restaurantes en los alrededores, y el supermercado m&aacute;s cercano est&aacute; a menos de 10 minutos caminando. El mar est&aacute; a menos de 5 minutos caminando&nbsp;desde la propriedad&nbsp;y la playa de Lo Ferris est&aacute; a unos 10 minutos. Hay un servicio de autobus que pasa cada&nbsp;hora y va&nbsp;al centro de Torrevieja o si prefiere caminar, puede llegar al puerto deportivo y al centro de la ciudad en menos de media hora.</p>

<p>&nbsp;</p>

<p>Los aeropuertos de Alicante y Murcia se encuentran a menos de 45 minutos en coche.</p>

<div>&nbsp;</div>

<p>&nbsp;</p>

<div class="gsrt tw-ta-container tw-nfl" id="tw-target-text-container" style="position: relative; padding-top: 20px; color: rgb(33, 33, 33); font-family: arial, sans-serif; font-size: 0px;">
<p>&nbsp;</p>

<p>&nbsp;</p>
</div>

...and AFTER processing:

Bonito apartamento con orientaci&oacute;n sur , ubicado en la zona de Mar Azul , Torrevieja. El apartamento esta en el segundo piso y consta de un amplio sal&oacute;n/comedor con cocina americana amueblada, un dormitorio doble de buen tama&ntilde;o con armarios empotrados y un ba&ntilde;o. Se accede al balc&oacute;n desde el sal&oacute;n y se beneficia del sol durante todo el d&iacute;a, con vistas hacia el mar y las monta&ntilde;as. La propiedad se encuentra en un complejo de apartamentos donde hay un bar-restaurante con piscina que puede ser utilizado por los vecinos a un peque&ntilde;o coste. Cada bloque se beneficia de ascensor. Los apartamentos gozan de una ubicaci&oacute;n ideal con numerosos bares, tiendas y restaurantes en los alrededores, y el supermercado m&aacute;s cercano est&aacute; a menos de 10 minutos caminando. El mar est&aacute; a menos de 5 minutos caminando desde la propriedad y la playa de Lo Ferris est&aacute; a unos 10 minutos. Hay un servicio de autobus que pasa cada hora y va al centro de Torrevieja o si prefiere caminar, puede llegar al puerto deportivo y al centro de la ciudad en menos de media hora. Los aeropuertos de Alicante y Murcia se encuentran a menos de 45 minutos en coche. <div> </div> <div class="gsrt tw-ta-container tw-nfl" id="tw-target-text-container" style="position: relative; padding-top: 20px; color: rgb(33, 33, 33); font-family: arial, sans-serif; font-size: 0px;"> </div>
No FR desc detected
No NL desc detected
No RU desc detected
No SV desc detected

Checking for two types of special English print desc (print, or short)..., that would trump the desc above...

No special print_desc was found
No special print_desc_es description was found

Checking prices

We have the current price (69999) - Checking for old prices...

The highest retrieved by the $listing->get_highestPrice() function is: 69999


Checking features

We have features so let's process them:

Exploded and sorted to

Array ( [0] => Beach front [1] => Ceiling fans [2] => Close to amenities [3] => Easy renting [4] => Elevator [5] => Fitted wardrobes [6] => Front balcony [7] => Part furnished [8] => Sun awning [9] => Walking distance to bars [10] => Walking distance to beach [11] => Walking distance to restaurants [12] => Walking distance to shops [13] => White goods )

That's 14 features

Here's a simple comma separated list in case you need it for the template... ... Beach front, Ceiling fans, Close to amenities, Easy renting, Elevator, Fitted wardrobes, Front balcony, Part furnished, Sun awning, Walking distance to bars, Walking distance to beach, Walking distance to restaurants, Walking distance to shops, White goods

... and fancier, split into three equal columns:

Array ( [0] => Beach front [1] => Ceiling fans [2] => Close to amenities [3] => Easy renting [4] => Elevator )
........................
Array ( [0] => Fitted wardrobes [1] => Front balcony [2] => Part furnished [3] => Sun awning [4] => Walking distance to bars )
........................
Array ( [0] => Walking distance to beach [1] => Walking distance to restaurants [2] => Walking distance to shops [3] => White goods )

So col 1 looped is:

  • Beach front
  • Ceiling fans
  • Close to amenities
  • Easy renting
  • Elevator

  • So col 2 looped is:

  • Fitted wardrobes
  • Front balcony
  • Part furnished
  • Sun awning
  • Walking distance to bars

  • So col 3 looped is:

  • Walking distance to beach
  • Walking distance to restaurants
  • Walking distance to shops
  • White goods


  • Checking images

    Running query to see if this listing has a pdf_images_order field

    ...which it does NOT, so we'll just use SQL to get the first six images like normal

    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(11).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(8).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(2).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(12).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(5).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(15).jpg

    • NOTE: images.upload.inc.php is set to use Amazon S3 in configuration
    • S3 class successfully included

    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(11).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(11).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(11).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(11).jpg,wb
    • fwrite the file with: Resource id #18, $imagecontent (Massive long string! lol
    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(8).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(8).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(8).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(8).jpg,wb
    • fwrite the file with: Resource id #20, $imagecontent (Massive long string! lol
    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(2).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(2).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(2).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(2).jpg,wb
    • fwrite the file with: Resource id #22, $imagecontent (Massive long string! lol
    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(12).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(12).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(12).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(12).jpg,wb
    • fwrite the file with: Resource id #24, $imagecontent (Massive long string! lol
    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(5).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(5).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(5).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(5).jpg,wb
    • fwrite the file with: Resource id #26, $imagecontent (Massive long string! lol
    • Let's download: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(15).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(15).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(15).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/990_spacious_south_facing_1_bedroom_seaside_apartment_walkable_to_the_beach_sr1000_(15).jpg,wb
    • fwrite the file with: Resource id #28, $imagecontent (Massive long string! lol

    Grabbing the template at: templates/tpl.window_card_sapphire.php
    Template included OK

    Checking cache for filename: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/pdf/pdf_cache/SAPP-SR1000-RM-T.pdf

    File does not exist in cache

    Checking SESSION for UserID - apparently not set?!


    You did not arrive from admin so the final header would be: /pdf/pdf_cache/SAPP-SR1000-RM-T.pdf
    Logging message to general log: "Printed window card for Ref: SAPP-SR1000-RM-T (ID 990) and sending the $userID: "
    Finished in 5.385 seconds
    Exiting due to debug true (ie not returning the pdf!)