New Quote and New Invoice Links Not Working in v1.4.0

I have installed and reinstalled it number of times but to no luck in fixing links to a New Invoice or a Quote, When i click on a new invoice link only this character gets added to a link (#).

What links do you mean?

HI, Links to a new quote or a button. If u want to create new invoice or a quote and click on a quick button or a menu link to a new invoice nothing happens. Thanks very much for all ur work.

This indicates that something is wrong with the loading trough JavaScript. Could you please try again, then open your browsers JavaScript console (see Google how to) and let me know what’s written there.

Hi Kovah,

This is the Java Script output error.

Uncaught SyntaxError: Unexpected identifier
oneclicksolutions.com.au/:23 Uncaught SyntaxError: Unexpected identifier
oneclicksolutions.com.au/:23 Uncaught SyntaxError: Unexpected identifier
oneclicksolutions.com.au/:23 Uncaught SyntaxError: Unexpected identifier
(index):23 Uncaught SyntaxError: Unexpected identifier
(index):23 Uncaught SyntaxError: Unexpected identifier
(index):23 Uncaught SyntaxError: Unexpected identifier

Okay.

  1. Please change “log_threshold” from 0 to 2 in the file /application/config/config.php
  2. Then click on the link again.
  3. Open the log file from /application/logs and save them on paste.invoiceplane.com
  4. Post the link here.

https://paste.invoiceplane.com/prdnxjd3e/hallc6

Thanks mate.

Hm… no related errors.

Do you have any saved clients where the name contains ' or "?

Not or but it has this, (), & -

You are Right, Name Field can not contain any symbols apart from Letters and Numbers and Spaces. Soon as field has anything else New Quotes and Invoices will not work.

1 Like

Hi all,
I faced the same error, because I’ve a customer with a ’ in the name.

As a temporary workaround, I used the prepared str_replace function in lines 26,27 in the following files:
\application\modules\invoices\views\modal_create_invoice.php
\application\modules\quote\views\modal_create_quote.php

I simply escape that special character:
id: ‘".str_replace("’", “’”, $client->client_name)."’,
text: ‘".str_replace("’", “’”, $client->client_name)."’

By the way, InvoicePlane is a great project. I’ve waited a long time for a self-hosted solution like this.

Thanks ipeter, will try that solution tonight.