Hey Guys, i am facing a “issue” kinda like my first issue that i opened here but this time in SuiteCRM V8.8.0.
When Printing a PDF from a Quote(“The PDF Template has a logo of the company”) the PDF removes the logo and returns this in the logs:
[Wed Apr 02 10:20:47.305186 2025] [proxy_fcgi:error] [pid 13367:tid 14975] [client IP:PORT] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "None" in /bitnami/suitecrm/vendor/tecnickcom/tcpdf/include/tcpdf_colors.php on line 260', referer: https://CRMURL/legacy/index.php?offset=1&module=AOS_Quotes&action=DetailView&record=RECORD-ID
Its similar to the issue i opened but this time i am wandering what could form this one.
Can Anyone try and check if its a reocurring issue? Or is it just in my install?
Wish you all a Good Day
Undefined array key ‘None’’ warning suggests that the code is trying to access an array index that does not exist. This issue can arise from incorrect configuration settings or an unexpected value being passed to the function. Regarding your question about the RECORD-ID, it is possible that the absence of a valid ID is contributing to the problem. If the system cannot locate the correct template or data associated with that ID, it may result in the failure to generate the PDF correctly.
Hey,
So i fixed the None Undefined Array but it seems its not the culprit here.
Still having the issue where all the template is printed besides the image,
Here is my fix for the Undefined Array Key :
File /bitnami/suitecrm/vendor/tecnickcom/tcpdf/include/tcpdf_colors.php
Function on line 260:
public static function getSpotColor($name, &$spotc) {
if (isset($spotc[$name])) {
return $spotc[$name];
}
$color = preg_replace('/[\s]*/', '', $name); // remove extra spaces
$color = strtolower($color);
if (!isset(self::$spotcolor[$color])) {
return false;
}
if (!isset($spotc[$name])) {
$i = (1 + count($spotc));
$spotc[$name] = array(
'C' => self::$spotcolor[$color][0],
'M' => self::$spotcolor[$color][1],
'Y' => self::$spotcolor[$color][2],
'K' => self::$spotcolor[$color][3],
'name' => self::$spotcolor[$color][4],
'i' => $i
);
}
return $spotc[$name];
}
/** FIXING THIS
if (isset(self::$spotcolor[$color])) {
if (!isset($spotc[$name])) {
$i = (1 + count($spotc));
$spotc[$name] = array('C' => self::$spotcolor[$color][0], 'M' => self::$spotcolor[$color][1], 'Y' => self::$spotcolor[$color][2], 'K' => self::$spotcolor[$color][3], 'name' >
}
return $spotc[self::$spotcolor[$color][4]];
}
return false;
}
*/
The Commented was the if’s that where throwing this exception.
Hey, thank you for your response.
I modified relevant part of the code that you shared, let’s see if it works for you.
public static function getSpotColor($name, &$spotc) {
if (isset($spotc[$name])) {
return $spotc[$name];
}
$color = preg_replace('/[\s]*/', '', $name); // eliminar espacios extra
$color = strtolower($color);
if (!isset(self::$spotcolor[$color])) {
return false;
}
if (!isset($spotc[$name])) {
$i = (1 + count($spotc));
$spotc[$name] = array(
'C' => self::$spotcolor[$color][0],
'M' => self::$spotcolor[$color][1],
'Y' => self::$spotcolor[$color][2],
'K' => self::$spotcolor[$color][3],
'name' => self::$spotcolor[$color][4],
'i' => $i
);
}
return $spotc[$name];
}
1 Like
Hey, so i used your function and cleared the errors in the logs,thank you for your help, but the issue persisted .
I found out it was a PICNIC issue (Problem in Chair Not In Computer) 
Because i am using a reverse proxy the template was grabbing the image from External DNS and not Internal hahaha.Since then i changed the source of the image and Its fixed now, sorry for any trouble given.
2 Likes