Highlighted

Problem previewing page on realtime preview

New Here ,
Aug 25, 2018

Copy link to clipboard

Copied

I am running dreamweaver 2017 and when i try to preview on real-time preview i get all browsers coming blank. Have tried clearing cache and no luck. can anyone help am stuck for days. on chrome it shows this error:

Failed to load resource: the server responded with a status of 404 (Not Found)

Then on Jquery:

15 Adobe Systems Incorporated.  All rights reserved. */

/*global $, console, URI, unescape*/

/*jslint regexp: true nomen: true, plusplus: true, bitwise: true, vars:true*/

function DevicePreviewUtils() {

    'use strict';

  

    this.createAjaxOptions = function (type, host, location, query) {

        var formedUrl = host + location,

            key,

            uri = new URI(formedUrl),

            options;

       

       

        for (key in query) {

            if (query.hasOwnProperty(key)) {

                uri.addSearch(key, query[key]);

            }

        }

       

        options = {

            'type': type,

            'url': uri.toString()

        };

       

        return options;

    };

   

    this.doAjaxGetRequest = function (host, location, query, successCallback, errorCallback) {

        var ajaxOptions = this.createAjaxOptions('GET', host, location, query);

        $.ajax(ajaxOptions).fail(function (jqXHR, textStatus, errorThrown) {

            // We got an error trying to run the work not sure what to do here

            console.log("call Failed!!  "  + textStatus);

            errorCallback.call(jqXHR, errorThrown);

        }).done(function (data, textStatus, jqXHR) {

            console.log("call succeeded!!");

            console.log(textStatus);

            successCallback.call(jqXHR, jqXHR.responseText);

        });

    };

   

    this.getAccessMethod = function () {

        var uri = new URI(window.location);

        return uri.search(true).m || '';

    };

   

    this.getDwSocketAppUrl = function () {

        return window.preview.config.DW_SERVER_PROTOCOL + '://' +

            window.preview.config.DW_SERVER_HOST +

            (window.preview.config.DW_SERVER_PORT ? ':' + window.preview.config.DW_SERVER_PORT : '');

    };

   

    this.convertPathArrayToString = function (pathArray) {

        if (!pathArray) {

            return '';

        }

       

        var path = '',

            index = 0;

        for (index = 0; index < pathArray.length; ++index) {

            var editedPath = pathArray[index];

            if (editedPath && editedPath.indexOf('DP_CLIENT_SOCKET_ID') !== -1) {

                editedPath = editedPath.replace('DP_CLIENT_SOCKET_ID', URI.encode(window.preview.socketApp.getSocket().id));

            }

           

            path += this.getDwSocketAppUrl() + editedPath;

        }

        return path;

    };

}

window.preview.utils = new DevicePreviewUtils();

Views

486

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problem previewing page on realtime preview

New Here ,
Aug 25, 2018

Copy link to clipboard

Copied

I am running dreamweaver 2017 and when i try to preview on real-time preview i get all browsers coming blank. Have tried clearing cache and no luck. can anyone help am stuck for days. on chrome it shows this error:

Failed to load resource: the server responded with a status of 404 (Not Found)

Then on Jquery:

15 Adobe Systems Incorporated.  All rights reserved. */

/*global $, console, URI, unescape*/

/*jslint regexp: true nomen: true, plusplus: true, bitwise: true, vars:true*/

function DevicePreviewUtils() {

    'use strict';

  

    this.createAjaxOptions = function (type, host, location, query) {

        var formedUrl = host + location,

            key,

            uri = new URI(formedUrl),

            options;

       

       

        for (key in query) {

            if (query.hasOwnProperty(key)) {

                uri.addSearch(key, query[key]);

            }

        }

       

        options = {

            'type': type,

            'url': uri.toString()

        };

       

        return options;

    };

   

    this.doAjaxGetRequest = function (host, location, query, successCallback, errorCallback) {

        var ajaxOptions = this.createAjaxOptions('GET', host, location, query);

        $.ajax(ajaxOptions).fail(function (jqXHR, textStatus, errorThrown) {

            // We got an error trying to run the work not sure what to do here

            console.log("call Failed!!  "  + textStatus);

            errorCallback.call(jqXHR, errorThrown);

        }).done(function (data, textStatus, jqXHR) {

            console.log("call succeeded!!");

            console.log(textStatus);

            successCallback.call(jqXHR, jqXHR.responseText);

        });

    };

   

    this.getAccessMethod = function () {

        var uri = new URI(window.location);

        return uri.search(true).m || '';

    };

   

    this.getDwSocketAppUrl = function () {

        return window.preview.config.DW_SERVER_PROTOCOL + '://' +

            window.preview.config.DW_SERVER_HOST +

            (window.preview.config.DW_SERVER_PORT ? ':' + window.preview.config.DW_SERVER_PORT : '');

    };

   

    this.convertPathArrayToString = function (pathArray) {

        if (!pathArray) {

            return '';

        }

       

        var path = '',

            index = 0;

        for (index = 0; index < pathArray.length; ++index) {

            var editedPath = pathArray[index];

            if (editedPath && editedPath.indexOf('DP_CLIENT_SOCKET_ID') !== -1) {

                editedPath = editedPath.replace('DP_CLIENT_SOCKET_ID', URI.encode(window.preview.socketApp.getSocket().id));

            }

           

            path += this.getDwSocketAppUrl() + editedPath;

        }

        return path;

    };

}

window.preview.utils = new DevicePreviewUtils();

Views

487

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 25, 2018 0
Adobe Community Professional ,
Aug 25, 2018

Copy link to clipboard

Copied

That usually happens when you try to open a server side scripted document and the server is not running. For example, a PHP document and no PHP server running.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2018 1
New Here ,
Aug 25, 2018

Copy link to clipboard

Copied

OK let change my html page to php and try again

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2018 0
Adobe Community Professional ,
Aug 26, 2018

Copy link to clipboard

Copied

No, that is not what I said. I assumed that your were using a server side scripted document without running a server.

Please show us a screen shot of your Site Setup Server panel like


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 1
New Here ,
Aug 26, 2018

Copy link to clipboard

Copied

screenshot.jpgHi Ben this is my screenshot

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
Adobe Community Professional ,
Aug 26, 2018

Copy link to clipboard

Copied

Are you sure that the XAMPP server is running? One way to find out is to type localhost into the address bar of the browser.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
New Here ,
Aug 26, 2018

Copy link to clipboard

Copied

Yes it's running have been using it on CS6 and when I put in cc 2017 thus when it started these issues.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
Adobe Community Professional ,
Aug 26, 2018

Copy link to clipboard

Copied

My local testing server (wamp) does not play well with Real-Time Preview.  I have found that a right-click on document tab and selecting Open in Browser works much better. CC-Preview-in-browser.jpg

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
Adobe Community Professional ,
Aug 26, 2018

Copy link to clipboard

Copied

I second what Nancy OShea posted; this has been an ongoing issue for many versions now, and the Open in Browser is your safest viewing option.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
New Here ,
Aug 26, 2018

Copy link to clipboard

Copied

Thank you let me try that

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2018 0
Adobe Community Professional ,
Aug 27, 2018

Copy link to clipboard

Copied

If you like, you can modify one of the program files to make Open in Browser (the old preview in browser) function as the F12 preview...

1. Close DW and go to...

    Windows: C: > Program Files > Adobe > Adobe Dreamweaver CC 2017 > configuration > Menus > MM

    Mac: Applications > Adobe Dreamweaver CC 2017 > configuration > Menus > MM

    (I think, I don't have a Mac to test)

2. Open the file "PIB_Dynamic.js"

2a. As always, make a backup in case something goes sideways. Add _old at the end of the back-up's file name.

3. Search for the text "dw.browseDocument". There are 3 spots with that code, but the first two are just comments. The right one should be on or about line 433, and change the text "isPIB" to "true"

The finished line of code will look like...

dw.browseDocument(dw.getDocumentPath('document'),theBrowser, "-1"/*help argument*/, false /*use temp doc*/, true);

4. Save the file to your desktop

5. Drag the file into the original location from Step 1. You will be prompted for your Admin credentials in order to make the copy/replacement

...From there on out, when you hit F12, DW will use Open in Browser with your local file, vs opening a connection to Adobe's servers to run your page in a frame for Real Time Preview.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2018 2