Can not publish website. "Publish" button can not be pressed.

Created:

2016-11-16 13:02:26 UTC

Modified:

2017-04-24 11:59:30 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Can not publish website. "Publish" button can not be pressed.

Applicable to:

  • Plesk for Linux
  • Web Presence Builder for Linux

Symptoms

Can not publish website. "Publish" button can not be pressed.

The following messages can be found in ' /usr/local/psa/admin/logs/sitebuilder.log ':

2014-07-18T08:26:06+04:00       [DEBUG] /sitebuilder/JsonApi/   Try to execute action default in controller JsonApi of module default   203.0.113.2     https://example.com:8443/sitebuilder/Editor   Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0

And publish log ' /usr/local/sb/logs/sites/e2/e234483d-25b3-5638-44f9-b78f9af8166f.log ' contains:

2014-07-18T09:12:49+04:00       [ERR]   /sitebuilder/JsonApi/   JavaScript error: URIError: malformed URI sequence on line 200 for https://example.com:8443/sitebuilder/js/Sb/model/Site.js?1399968984        203.0.113.2     https://example.com:8443/sitebuilder/Editor    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0

Line 200 from ' /usr/local/sb/htdocs/js/Sb/model/Site.js ' contains the following:

'usedImage = decodeURIComponent(usedImage.match(reIsAttachmentImage)[1]);'

When you run Firebug in 'Script' tab you can find an error:

widget_like.php?app=2405132&width=100%&_ver=1&page=0&url=http%3A%2F%2Fexample.com%2Fapartments%2Fmoldingi-na-stenah%2F&type=mini&verb=0&color=&title=%D0%9A%D0%B0%D0%BA%20%D0%B4%D0%B5%D0%BA%D0%BE%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C%20%D1%81%D1%82%D0%B5%D0%BD%D1%8B%20%D0%BC%D0%BE%D0%BB%D0%B4%D0%B8%D0%BD%D0%B3%D0%B0%D0%BC%D0%B8&description=&image=http%3A%2F%2Fexample.com%2Fwp-content%2Fuploads%2F2014%2F02%2F23-140x140.jpg

URIError: malformed URI sequence
usedImage = decodeURIComponent(usedImage.match(reIsAttachmentImage)[1]);

Cause

Method ' decodeURIcomponent() ' attempted to decode URI of image but failed due to URI contains illegal symbol ' &amp ' in ' width=100%&amp ';.

For example, result of using this method:

http%3A%2F%2Fw3example.com%2Fmy%20test.asp%3Fname%3Dst%C3%A5le%26car%3Dsaab
// Encoded URI

http://example.com/my test.asp?name=ståle&car=saab
// Decoded URI

Resolution

To resolve the issue follow the steps bellow:

  1. Backup 'sitebuilder5' database:

    # mysqldump -uadmin -p`dbroot.sh` sitebuilder5 --skip-opt --skip-extended-insert > /tmp/wp.sql; cp /tmp/wp.sql{,_backup}
  2. Find the string with illegal symbol ' &amp ' and remove it via text editor:

    # grep &amp /tmp/wp.sql
    ...
    <a href=# width='100%&amp'>test</a>:1123
    ...
    # vi /tmp/wp.sql
  3. Restore database with the following command:

    # mysql -uadmin -p`dbroot.sh` sitebuilder5 --default-character-set=utf8  < /tmp/wp.sql

In case of failure restore initial 'sitebuilder5' database dump ' /tmp/wp.sql_backup ':

# mysql -uadmin -p`dbroot.sh` sitebuilder5 --default-character-set=utf8  < /tmp/wp.sql_backup
Have more questions? Submit a request
Please sign in to leave a comment.