Website is not published if debug mode is enabled.

Created:

2016-11-16 13:11:44 UTC

Modified:

2017-08-16 17:14:33 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website is not published if debug mode is enabled.

Applicable to:

  • Plesk 12.5 for Linux
  • Web Presence Builder for Linux
  • Plesk 12.0 for Linux

Symptoms

Error is shown during website publishing:

Some Errors were written to log. Please contact to administrator.

Debug mode is enabled:

# grep -i debug /usr/local/sb/config
debug = on

Also, the following warning appears in sitebuilder.log right after "The site with UUID has been successfully published" log entry:

[WARN]  /JsonApi/       A website with uuid "4c8db241-8259-128b-6db8-5b52bcd1857a" attempted to delete files that do not belong to it.
$usedUploadedFiles = "image1.jpg, image2.JPG, image3.jpg"
$uploadedFiles = "image4.jpg, image5.jpg, image6.JPG"
$filesToDelete = "image7.jpg, image8.JPG, image9.JPG"
10.10.10.10 https://presence-builder-host.tld/Editor Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0

When debug is disabled, the website is published successfully without any error in browser.

Cause

When debug mode is enabled, Presence Builder sends unsuccessful response to browser in case some warnings appear. However, when debug mode is disabled Presence Builder ignores some warnings.This behavior has been submitted as a software issue with internal id #PPB-4409 and will be fixed in future product updates.

Resolution

The warning "A website with uuid "4c8db241-8259-128b-6db8-5b52bcd1857a" attempted to delete files that do not belong to it" means that some files from " $usedUploadedFile " or " $filesToDelete " lists do not exist on Presence Builder side.

" $usedUploadedFile " files are supposed to be on the website and they are not going to be deleted." $filesToDelete " files are going to be deleted from the website after successful publishing.

In order to fix the issue, it is needed to place files with the same names to appropriate website's directory on Presence Builder side.

Each Presence Builder website's directory can be found as per the scheme below:

%presence-builder-location%/htdocs/sites/xx/%dir_name%

" %presence-builder-location% " - Presence Builder location. In case of Plesk and Standalone installation it is " /usr/loca/sb ".

" %dir_name% " - the website unique identifier which can be obtained in Presence Builder database.

" xx " - first 2 digits of " %dir_name% "

  1. First, it is needed to find " %dir_name% " of the website on Presence Builder side. Use the following mysql query in Presence Builder database:

    mysql> select sps.url, s.dir_name from site s, site_publish_settings sps where s.site_publish_settings_id=sps.id and sps.url='http://example.com/';
    +---------------------+----------------------------------+
    | url | dir_name |
    +---------------------+----------------------------------+
    | http://example.com/ | 93b9c6f1d5d870844251ff5e57cdd9b9 |
    +---------------------+----------------------------------+
    1 row in set (0.00 sec)
  2. Open Presence Builder directory

    # cd /usr/local/sb/htdocs/sites/93/93b9c6f1d5d870844251ff5e57cdd9b9
  3. Open the appropriate directory, which is supposed to contain all the files from " $usedUploadedFile " and " $filesToDelete "

    # cd attachments/Image
  4. Determine files which do not exist.

  5. Create missing files with the same names and publish the website again.

As a result, " $filesToDelete " files will be deleted. As for " $usedUploadedFile " files create a list of $usedUploadedFile and $uploadedFiles . Compare them using Computed Diff and create files which do exist in $usedUploadedFile and do not in $uploadedFiles .

Have more questions? Submit a request
Please sign in to leave a comment.