summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsangus2018-10-03 18:21:01 (GMT)
committerJoao Ventura2018-10-03 18:21:01 (GMT)
commit08a27ec228de8899330e54952fc22a3579e5e3dd (patch)
treefe0841bacfadc7ff32324cae66752ed19af743b8
parent7af42679ebe62b506caafe3a210ec3ad3b78e375 (diff)
Issue #2348737 by sangus, jcnventura: Data too long for column 'path'
-rw-r--r--print.pages.inc2
-rw-r--r--print_epub/print_epub.pages.inc2
-rw-r--r--print_mail/print_mail.inc2
-rw-r--r--print_pdf/print_pdf.pages.inc2
4 files changed, 4 insertions, 4 deletions
diff --git a/print.pages.inc b/print.pages.inc
index 9e3b306..9fd3eb3 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -41,7 +41,7 @@ function print_controller_html() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_page_counter')
- ->key(array('path' => $nodepath))
+ ->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
diff --git a/print_epub/print_epub.pages.inc b/print_epub/print_epub.pages.inc
index 1e9e837..48c800c 100644
--- a/print_epub/print_epub.pages.inc
+++ b/print_epub/print_epub.pages.inc
@@ -74,7 +74,7 @@ function print_epub_controller() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_epub_page_counter')
- ->key(array('path' => $nodepath))
+ ->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
diff --git a/print_mail/print_mail.inc b/print_mail/print_mail.inc
index afe185c..17b0bce 100644
--- a/print_mail/print_mail.inc
+++ b/print_mail/print_mail.inc
@@ -115,7 +115,7 @@ function print_mail_form_for_path($form, &$form_state, $path, $query = NULL, $us
if (count($form_state['input']) == 0) {
$nodepath = drupal_get_normal_path($path);
db_merge('print_mail_page_counter')
- ->key(array('path' => $nodepath))
+ ->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
diff --git a/print_pdf/print_pdf.pages.inc b/print_pdf/print_pdf.pages.inc
index a5961cb..a6520d7 100644
--- a/print_pdf/print_pdf.pages.inc
+++ b/print_pdf/print_pdf.pages.inc
@@ -74,7 +74,7 @@ function print_pdf_controller() {
$nodepath = (isset($node->nid)) ? 'node/' . $node->nid : drupal_get_normal_path($path);
db_merge('print_pdf_page_counter')
- ->key(array('path' => $nodepath))
+ ->key(array('path' => substr($nodepath, 0, 255)))
->fields(array(
'totalcount' => 1,
'timestamp' => REQUEST_TIME,