Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul 24 posts 114 karma points
    May 11, 2015 @ 18:05
    Paul
    0

    Why has my Save and Publish button stopped working?

    Hi, I am getting strange behaviours from my save and save and publish button.

    I seem to be having the exact same issue as this guy on Stack Overflow

    I am attempting to update data through the content tab. Some pages save fine after a few hard refreshes, some are intermittent, and some refuse to save at all.

    The Save and Publish button appears not to function, but the console leaves the following information:

    TypeError: Cannot read property 'apply' of undefined
    
    at Object.reset (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…VlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:801)
    
    at Object.submitForm (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…VlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:643)
    
    at Object.contentEditorPerformSave (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…VlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:584)
    
    at performSave (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…lTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:1168)
    
    at Object.ContentEditController.$scope.saveAndPublish (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…lTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:1174)
    
    at Object.ContentEditController.$scope.performAction (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…lTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:1175)
    
    at /DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…mVlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:13
    
    at /DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…mVlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:42
    
    at Object.e.$eval (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…mVlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:14)
    
    at Object.e.$apply (/DependencyHandler.axd?s=L3VtYnJhY28vbGliL2pxdWVyeS9qcXVlcnkubWluLmpzOy91bW…mVlTWVudS9BY3Rpb25OZXdSZWxhdGlvblR5cGUuanM7&t=Javascript&cdv=1459900925:14)
    

    Oddly enough, the whole system seemed to be working absolutely fine earlier. I left it for a few hours and then the fault appeared when I went back to it. I have been creating new macros to replace old uComponents that are still in the system after upgrading, adding them to new tabs on the old doctypes and updating each content page through the CMS panel. I don't think this is relevant though, as it was all working OK.

    I have checked the following:

    • Permissions of files and folders on server
    • Accessing /umbraco/ directly from Chrome on the server
    • Restarting website in IIS
    • Closing VS 2013
    • Tried using IE and Chrome
    • Deleted umbraco.config and republished site

    Where should I go next with this? Can I safely overwrite the Umbraco folder with a freshly downloaded copy?

    Thanks

    Paul

  • Paul 24 posts 114 karma points
    May 12, 2015 @ 10:27
    Paul
    0

    I am also getting these errors periodically: Could not find the tree partialviewmacros, activeTree has not been set and propertyAlias must be a string. Since posting the above, I have also:

    • Deleted all files at /app_data/TEMP/ClientDependency
    • Incremented the version at /config/ClientDependency.config
    • Recycled the app pool

    As Jan suggests here

    Could this perhaps have have been caused by not removing uComponents before upgrading to 7?

  • Paul 24 posts 114 karma points
    May 12, 2015 @ 11:27
    Paul
    0

    Someone else has been through my code and found this possible fix/workaround in \Umbraco\js\umbraco.services.js This function loops through the array and then through some methods which seems to be causing grief. var cb is numeric up to 32 (in my case) then becomes "shuffle" and that throws the error in the first post.

       reset: function () {
            this.clear();
            for (var cb in callbacks) {
                callbacks[cb].callback.apply(this, [
                        true,       //pass in a value indicating it is VALID
                        [],         //pass in empty collection
                        []]);       //pass in empty collection
            }
        },
    

    has been changed to:

    reset: function () {
            this.clear();
            for (var cb=0; cb<callbacks.length; cb++) {
                callbacks[cb].callback.apply(this, [
                        true,       //pass in a value indicating it is VALID
                        [],         //pass in empty collection
                        []]);       //pass in empty collection
            }
    },
    

    And now it seems to be working.

Please Sign in or register to post replies

Write your reply to:

Draft