Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: S3 Image Upload breaks field if session expired. #28

Open
rnlambert7 opened this issue Jan 2, 2018 · 0 comments
Open

Bug: S3 Image Upload breaks field if session expired. #28

rnlambert7 opened this issue Jan 2, 2018 · 0 comments

Comments

@rnlambert7
Copy link

rnlambert7 commented Jan 2, 2018

The Bug/Issue and replication: If your session has expired for whatever reason (time, timeout, server restart)(No indication your session was expired FYI) and you attempt to upload a new image it will fail (as it should) and then in the process change the value of the field from '' to {}. Upon signing in again, refreshing, etc, you cannot update the field and you will continue to receive angular errors. The only way to fix this is to go to the flat file db in /cms and reset the image filed back from {} to ''.

Here are the errors I received if it helps address this:
Upon trying to upload after session expired:

Possibly unhandled rejection: {"data":"Unauthorized","status":401,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/admin_api/img_upload","data":{"sid":"veHtI2A7QniHPA_ALFTwecp2VfRiGWHL","file":{"$ngfDataUrl":"data:image/png;base64,iVBORw.... continues on with base64 code of image..

Upon trying to upload while image field is {}:

angular.js:14642 Error: [$sce:itype] Attempted to trust a non-string value in a content requiring a string: Context: resourceUrl
http://errors.angularjs.org/1.6.5/$sce/itype?p0=resourceUrl
    at http://localhost:5000/admin/assets/vendor/angular/angular.js:116:12
    at trustAs (http://localhost:5000/admin/assets/vendor/angular/angular.js:19222:15)
    at Object.sce.(anonymous function) [as trustAsResourceUrl] (http://localhost:5000/admin/assets/vendor/angular/angular.js:20013:16)
    at Object.<anonymous> (http://localhost:5000/admin/assets/js/controllers/control_controllers/image_controller.js:36:29)
    at Object.invoke (http://localhost:5000/admin/assets/vendor/angular/angular.js:5040:19)
    at $controllerInit (http://localhost:5000/admin/assets/vendor/angular/angular.js:10960:34)
    at nodeLinkFn (http://localhost:5000/admin/assets/vendor/angular/angular.js:9840:35)
    at compositeLinkFn (http://localhost:5000/admin/assets/vendor/angular/angular.js:9149:13)
    at publicLinkFn (http://localhost:5000/admin/assets/vendor/angular/angular.js:9014:30)
    at Object.link (http://localhost:5000/admin/assets/vendor/angular/angular.js:28135:38) "<div ng-if="!globalizer &amp;&amp; terminated_context.type &amp;&amp; !terminated_context.control_path" ng-include="'/admin/controls/' + terminated_context.type + '_control/index.html'" class="ng-scope">"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant