skelpo / skelpo-translation-for-acf

AI driving translations for ACF fields. DeepL and fully integrated.
https://www.morepixel.com/acf-deepl-google-translation/
GNU General Public License v3.0
1 stars 2 forks source link

Skelpo API Key refuses to be fetched #1

Closed XavaIreland closed 1 year ago

XavaIreland commented 1 year ago

async function acft_check() { if (acft_license_code) {

    const response = await fetch("https://api.skelpo.com/v1/licenses/check/"+acft_license_code, {
        method: 'GET',
      });
    return response.json();
}
else {
    return false;
}

}

in the settings file informs me that it could not feth the ACFT_liense_code.

I visited https://api.skelpo.com/v1/licenses/check/ directly in my browser and I get the error: {"reason":"Not Found","error":true} which would suggest that the license check is non-existent. Can you please comment on this.

proggeramlug commented 1 year ago

Hi @XavaIreland thanks for reaching out.

You would need to add the license key to the URL for it to return a proper response. Like https://api.skelpo.com/v1/licenses/check/KEY

Do you have a call that sends to https://api.skelpo.com/v1/licenses/signup as a POST call? Because that's the one that will register your installation with the key.

XavaIreland commented 1 year ago

Thanks for the quick response. How do I get the key?

I added a DeepL API key for the DeepL free server in the DeepL tab. As for the Usage & License, I don't know where to get the key or how to generate it?

XavaIreland commented 1 year ago

Further info:

When I try to hit Translate on the page edit screen, I get an error this part of the code in translate.js:

async function acft_translate() { if (currentState == undefined) { let c = await acft_check(); if (c == false) { let c = await acft_sign_up(); acft_license_code = c.licenseKey; c = await acft_check(); } currentState = c; }

The error is

Uncaught (in promise) TypeError: Assignment to constant variable. at acft_translate (translate.js?ver=6.3.2:38:22) acft_translate @ translate.js?ver=6.3.2:38 await in acft_translate (async) onclick @ post.php?post=9801&action=edit:814

proggeramlug commented 1 year ago

@XavaIreland we just updated the API, there was in fact a small error there.

Can you reload the plugin settings page and see if you see a license key there?

XavaIreland commented 1 year ago

YAY!!

proggeramlug commented 1 year ago

Does the rest of it work for you as well now? 🙃

XavaIreland commented 1 year ago

So I now go to the page and hit Translate and I get this:

Access to fetch at 'https://api.skelpo.com/v1/translations/translate' from origin 'https://www.superfy.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. api.skelpo.com/v1/translations/translate:1

   Failed to load resource: net::ERR_FAILED

translate.js?ver=6.3.2:152

   Uncaught (in promise) TypeError: Failed to fetch
at translateTextSkelpo (translate.js?ver=6.3.2:152:26)
at acft_translate (translate.js?ver=6.3.2:112:23)
at HTMLAnchorElement.onclick (post.php?post=9801&action=edit&translated=1:826:135)

This piece of code is referenced:

if (engine == "deepl") { dd["deeplKey"] = acft_deepl_api_key; } const response = await fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(dd), });

I have the following in my htaccess:

Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS" Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
proggeramlug commented 1 year ago

Let me check that out, I'll get back to you within 1h.

XavaIreland commented 1 year ago

Thank you

proggeramlug commented 1 year ago

Alright, could you try again? I've enabled some debugging for me to see what is happening on our side here.

XavaIreland commented 1 year ago

Thanks for the changes: here is the debug info:

id: content tN {documentBaseUrl: 'https://www.superfy.com/wp-admin/', settings: {…}, id: 'content', isNotDirty: true, plugins: {…}, …}$: ƒ (e,t)addButton: ƒ (e,t)annotator: {register: ƒ, annotate: ƒ, annotationChanged: ƒ, remove: ƒ, getAll: ƒ}baseURI: zw {settings: {…}, source: 'https://www.superfy.com/wp-includes/js/tinymce', protocol: 'https', authority: 'www.superfy.com', userInfo: undefined, …}bookmark: undefinedbuttons: {align: {…}, alignleft: {…}, aligncenter: {…}, alignright: {…}, formatselect: ƒ, …}container: div#mceu_28.mce-tinymce.mce-container.mce-panelcontentAreaContainer: div#mceu_44.mce-edit-area.mce-container.mce-panel.mce-stack-layout-itemcontentCSS: (7) ['https://www.superfy.com/wp-includes/js/tinymce/skins/lightgray/content.min.css', 'https://www.superfy.com/wp-includes/css/dashicons.min.css?ver=6.3.2', 'https://www.superfy.com/wp-includes/js/tinymce/skins/wordpress/wp-content.css?ver=6.3.2', 'https://www.superfy.com/wp-content/plugins/popup-maker/assets/css/pum-site.min.css', 'https://www.superfy.com/wp-content/plugins/nextgen…post/static/ngg_attach_to_post_tinymce_plugin.css', 'https://www.superfy.com/wp-content/plugins/popup-maker/assets/css/pum-admin-editor-styles.min.css', 'https://www.superfy.com/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2130.css']contentDocument: documentcontentStyles: (3) ['.mce-content-body div.mce-resizehandle {position: …x;padding: 5px;position: absolute;z-index: 10001}', '.mce-visual-caret {position: absolute;background-c…-1000px;right: auto;top: 0;margin: 0;padding: 0;}', '.mce-content-body .mce-offscreen-selection {positi…tent-body *[contentEditable=true] {cursor: text;}']contentWindow: Window {window: Window, self: Window, document: document, name: '', location: Location, …}controlManager: {buttons: {…}, onAdd: i, onPostRender: i, setDisabled: ƒ, setActive: ƒ, …}delegates: {keydown: ƒ, keypress: ƒ, keyup: ƒ, submit: ƒ, focusin: ƒ, …}documentBaseURI: zw {settings: {…}, source: '', protocol: 'https', authority: 'www.superfy.com', userInfo: undefined, …}documentBaseUrl: "https://www.superfy.com/wp-admin/"dom: {doc: document, settings: {…}, win: Window, files: {…}, stdMode: true, …}editorCommands: pp {execCommand: ƒ, queryCommandState: ƒ, queryCommandValue: ƒ, queryCommandSupported: ƒ, addCommands: ƒ, …}editorContainer: div#mceu_28.mce-tinymce.mce-container.mce-paneleditorManager: {defaultSettings: {…}, majorVersion: '4', minorVersion: '9.11', releaseDate: '2020-07-13', $: ƒ, …}editorUpload: {blobCache: {…}, addFilter: ƒ, uploadImages: ƒ, uploadImagesAuto: ƒ, scanForImages: ƒ, …}formElement: form#postformEventDelegate: ƒ (e)formatter: {get: ƒ, register: ƒ, unregister: ƒ, apply: ƒ, remove: ƒ, …}hasVisual: truehidden: falseid: "content"iframeElement: iframe#content_ifriframeHTML: "<!DOCTYPE html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /><body id=\"tinymce\" class=\"mce-content-body content post-type-page post-status-publish page-template-front-page locale-en-us\" data-id=\"content\">
"initialized: trueinline: undefinedisNotDirty: trueloadedCSS: {}menuItems: {blockformats: {…}, align: {…}, bold: {…}, italic: {…}, underline: {…}, …}notificationManager: {open: ƒ, close: ƒ, getNotifications: ƒ}onActivate: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onBeforeExecCommand: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onBeforeGetContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onBeforeRenderUI: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onBeforeSetContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onChange: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onClick: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onContextMenu: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onDblClick: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onDeactivate: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onExecCommand: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onGetContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onInit: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onKeyDown: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onKeyPress: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onKeyUp: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onLoad: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onLoadContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onMouseDown: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onMouseUp: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onNodeChange: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onPaste: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onPostProcess: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onPostRender: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onPreInit: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onPreProcess: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onRedo: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onRemove: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onReset: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onSaveContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onSetContent: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onSetProgressState: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onSubmit: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onUndo: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}onVisualAid: i {add: ƒ, addToTop: ƒ, remove: ƒ, dispatch: ƒ}orgDisplay: ""orgVisibility: ""parser: {schema: {…}, addAttributeFilter: ƒ, getAttributeFilters: ƒ, addNodeFilter: ƒ, getNodeFilters: ƒ, …}plugins: {charmap: {…}, colorpicker: {…}, hr: {…}, lists: {…}, media: {…}, …}quirks: {refreshContentEditable: ƒ, isHidden: ƒ}readonly: undefinedrtl: falseschema: {children: {…}, elements: {…}, getValidStyles: ƒ, getValidClasses: ƒ, getBlockElements: ƒ, …}selection: {bookmarkManager: {…}, controlSelection: {…}, dom: {…}, win: Window, serializer: {…}, …}serializer: {schema: {…}, addNodeFilter: ƒ, addAttributeFilter: ƒ, serialize: ƒ, addRules: ƒ, …}settings: {id: 'content', theme: 'modern', delta_width: 0, delta_height: 0, popup_css: '', …}shortcuts: Qp {add: ƒ, remove: ƒ}startContent: "

<br data-mce-bogus=\"1\">

"suffix: ".min"targetElm: textarea#content.wp-editor-areatheme: {renderUI: ƒ, resizeTo: ƒ, resizeBy: ƒ, getNotificationManagerImpl: ƒ, getWindowManagerImpl: ƒ, …}undoManager: {data: Array(1), typing: false, beforeChange: ƒ, add: ƒ, undo: ƒ, …}windowManager: tinymce.WPWindowManager.tinymce.InlineWindowManager {wp: {…}, parent: {…}, editor: tN, windows: Array(0), open: ƒ, …}wp: {isPlaceholder: ƒ, getView: ƒ, setViewCursor: ƒ, _createToolbar: ƒ}wpGetImgCaption: ƒ s(e)wpSetImgCaption: ƒ d(e)_eventDispatcher: vp {fire: ƒ, on: ƒ, off: ƒ, once: ƒ, has: ƒ}_nodeChangeDispatcher: ev {nodeChanged: ƒ}_pendingNativeEvents: (25) ['keydown', 'keypress', 'keyup', 'submit', 'focusin', 'focusout', 'input', 'cut', 'paste', 'mousedown', 'click', 'copy', 'drop', 'dragstart', 'dragend', 'dragover', 'mouseup', 'selectionchange', 'touchend', 'contextmenu', 'touchstart', 'touchmove', 'mousemove', 'compositionstart', 'compositionend']_selectionOverrides: {showCaret: ƒ, showBlockCaretContainer: ƒ, hideFakeCaret: ƒ, destroy: ƒ}_skinLoaded: true[[Prototype]]: Object translate.js?ver=6.3.2:59 id: acf_content tN {documentBaseUrl: 'https://www.superfy.com/wp-admin/', settings: {…}, id: 'acf_content', isNotDirty: true, plugins: {…}, …} translate.js?ver=6.3.2:98 engine: deepl (98) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]0: {type: 'tinymce', originalContent: '', instance: tN}1: {type: 'tinymce', originalContent: '', instance: tN}2: {type: 'input', originalContent: 'Request Demo', instance: input#acf-field_63987767b683a-field_6398778bb683c-field_63987791b683d}3: {type: 'input', originalContent: 'Get Newsletter', instance: input#acf-field_63987767b683a-field_639877aab683f-field_639877b1b6840}4: {type: 'input', originalContent: 'tel:+611300893610', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-0-field_641224c161fe3}5: {type: 'input', originalContent: 'Call Us', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-0-field_641224c161fe4}6: {type: 'input', originalContent: 'http://www.superfy.com/get-started/contact-us/', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-1-field_641224c161fe3}7: {type: 'input', originalContent: 'Contact Us', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-1-field_641224c161fe4}8: {type: 'input', originalContent: 'mailto:sales@superfy.com ', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-2-field_641224c161fe3}9: {type: 'input', originalContent: 'Email Us', instance: input#acf-field_641224c161fd9-field_641224c161fe0-row-2-field_641224c161fe4}10: {type: 'input', originalContent: 'Request A Demo', instance: input#acf-field_641224c161fd9-field_641224c161fe5-field_641224c161fe6}11: {type: 'input', originalContent: 'Smart Resource Management Solutions for the Circular Economy', instance: input#acf-field_6377624ec650c-field_637795653e808-field_637752ff35a6e}12: {type: 'input', originalContent: 'The Superfy software platform and range of sensors…de materials collection and recycling programmes.', instance: input#acf-field_6377624ec650c-field_637795653e808-field_6377570b35a6f}13: {type: 'input', originalContent: 'tel:+611300893610', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-0-field_63ecac7c2763f}14: {type: 'input', originalContent: 'Call Us', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-0-field_63f73de33052d}15: {type: 'input', originalContent: 'http://www.superfy.com/get-started/contact-us/', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-1-field_63ecac7c2763f}16: {type: 'input', originalContent: 'Contact Us', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-1-field_63f73de33052d}17: {type: 'input', originalContent: 'mailto:sales@superfy.com ', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-2-field_63ecac7c2763f}18: {type: 'input', originalContent: 'Email Us', instance: input#acf-field_6377624ec650c-field_63ecaadc2763d-row-2-field_63f73de33052d}19: {type: 'input', originalContent: 'Request A Demo', instance: input#acf-field_6377624ec650c-field_6377595d35a72-field_63775bc835a75}20: {type: 'input', originalContent: 'Find out more about our smart waste and recycling solutions.', instance: input#acf-field_6377cb2bebffa-field_6377d2bfd43fb-field_6377cb62ebffb}21: {type: 'input', originalContent: 'Contact Sales', instance: input#acf-field_6377cb2bebffa-field_6377d34ed43fc-field_6377cbf9ebffe}22: {type: 'input', originalContent: 'Delivering a more sustainable world - together ', instance: input#acf-field_63878589fca23-field_637ca09b9222b}23: {type: 'input', originalContent: 'Advancing sustainable solutions for all', instance: input#acf-field_6387c457e65ea-field_6387c457e65eb}24: {type: 'input', originalContent: 'Learn More', instance: input#acf-field_6387c457e65ea-field_6387c457e65ee-field_6387c457e65ef}25: {type: 'input', originalContent: 'Case Study', instance: input#acf-field_6387c457e65ea-field_6387c457e65f1-field_6387c457e65f2}26: {type: 'input', originalContent: 'Variety of recycling use cases to increase your operational efficiency', instance: input#acf-field_637d4ccad7e78-field_637d4cefd7e79}27: {type: 'input', originalContent: 'Batteries', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-0-field_637d519ad7e7e}28: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-0-field_637d520cd7e7f-field_637d5223d7e80}29: {type: 'input', originalContent: 'Soft Plastics', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-1-field_637d519ad7e7e}30: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-1-field_637d520cd7e7f-field_637d5223d7e80}31: {type: 'input', originalContent: 'E-Waste', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-2-field_637d519ad7e7e}32: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-2-field_637d520cd7e7f-field_637d5223d7e80}33: {type: 'input', originalContent: 'PET Bottles', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-3-field_637d519ad7e7e}34: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-3-field_637d520cd7e7f-field_637d5223d7e80}35: {type: 'input', originalContent: 'Glass Bottles', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-4-field_637d519ad7e7e}36: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-4-field_637d520cd7e7f-field_637d5223d7e80}37: {type: 'input', originalContent: 'Aluminium Cans', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-5-field_637d519ad7e7e}38: {type: 'input', originalContent: 'Learn more', instance: input#acf-field_637d4ccad7e78-field_637d4d7fd7e7a-row-5-field_637d520cd7e7f-field_637d5223d7e80}39: {type: 'input', originalContent: 'Global Partner - Control link', instance: input#acf-field_637def497c68b-field_63b6afc412d99}40: {type: 'input', originalContent: 'Contact Us', instance: input#acf-field_637def497c68b-field_637df0fd7c68f-field_637df0fd7c690}41: {type: 'input', originalContent: 'Trusted By', instance: input#acf-field_637fac4625790-field_637fbe5725791}42: {type: 'input', originalContent: 'Our Partners', instance: input#acf-field_637f8a8fcfc4e-field_637f8a8fcfc4f}43: {type: 'input', originalContent: 'View All', instance: input#acf-field_637f8a8fcfc4e-field_637f8a8fcfc52-field_637f8a8fcfc53}44: {type: 'input', originalContent: 'Superfy Support', instance: input#acf-field_637ff10affdb6-field_63a32e944c476}45: {type: 'input', originalContent: 'Global Support ', instance: input#acf-field_637ff10affdb6-field_63a32e9a4c477}46: {type: 'input', originalContent: 'Contact Support', instance: input#acf-field_637ff10affdb6-field_637ff678ffdbf-field_637ff69affdc0}47: {type: 'input', originalContent: 'Plans to suit all teams', instance: input#acf-field_6380013640810-field_63a333dcebc2c}48: {type: 'input', originalContent: 'Lite', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_638003b940816}49: {type: 'input', originalContent: 'Talk to us', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380041d40817}50: {type: 'input', originalContent: 'Up to 100 Assets', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380047d40819-row-0-field_638004a0408…}51: {type: 'input', originalContent: 'Predictive Collection', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380047d40819-row-1-field_638004a0408…}52: {type: 'input', originalContent: 'Collection History', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380047d40819-row-2-field_638004a0408…}53: {type: 'input', originalContent: 'IoT Enabled', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380047d40819-row-3-field_638004a0408…}54: {type: 'input', originalContent: 'Team License', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_6380047d40819-row-4-field_638004a0408…}55: {type: 'input', originalContent: 'Request Demo', instance: input#acf-field_6380013640810-field_6380036340815-row-0-field_638004fc4081b-field_638005284081c}56: {type: 'input', originalContent: 'Professional', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_638003b940816}57: {type: 'input', originalContent: 'Talk to us', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380041d40817}58: {type: 'input', originalContent: "'Lite' Package Plus…", instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-0-field_638004a0408…}59: {type: 'input', originalContent: 'Up to 1000 Assets', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-1-field_638004a0408…}60: {type: 'input', originalContent: 'Routing', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-2-field_638004a0408…}61: {type: 'input', originalContent: 'Reports and Analytics', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-3-field_638004a0408…}62: {type: 'input', originalContent: 'Asset Management', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-4-field_638004a0408…}63: {type: 'input', originalContent: 'Vendor Management', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_6380047d40819-row-5-field_638004a0408…}64: {type: 'input', originalContent: 'Request Demo', instance: input#acf-field_6380013640810-field_6380036340815-row-1-field_638004fc4081b-field_638005284081c}65: {type: 'input', originalContent: 'Enterprise', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_638003b940816}66: {type: 'input', originalContent: 'Talk to us', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380041d40817}67: {type: 'input', originalContent: "'Professional' Package Plus", instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-0-field_638004a0408…}68: {type: 'input', originalContent: 'Unlimited Assets', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-1-field_638004a0408…}69: {type: 'input', originalContent: 'Sustainability Reporting', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-2-field_638004a0408…}70: {type: 'input', originalContent: 'Work Force Management', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-3-field_638004a0408…}71: {type: 'input', originalContent: 'CRM and ERP', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-4-field_638004a0408…}72: {type: 'input', originalContent: 'Telematics Integration', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-5-field_638004a0408…}73: {type: 'input', originalContent: 'Fleet Management', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_6380047d40819-row-6-field_638004a0408…}74: {type: 'input', originalContent: 'Request Demo', instance: input#acf-field_6380013640810-field_6380036340815-row-2-field_638004fc4081b-field_638005284081c}75: {type: 'input', originalContent: 'Get In Touch', instance: input#acf-field_6380e05ce19d8-field_63a3361c90c78}76: {type: 'input', originalContent: 'Asset Management', instance: input#acf-field_6380e05ce19d8-field_63a3362f90c7a-field_63a3363f90c7b-row-0-field_63a3365490c7d}77: {type: 'input', originalContent: 'Insights', instance: input#acf-field_6380e05ce19d8-field_63a3362f90c7a-field_63a3363f90c7b-row-1-field_63a3365490c7d}78: {type: 'input', originalContent: 'Routing', instance: input#acf-field_6380e05ce19d8-field_63a3362f90c7a-field_63a3363f90c7b-row-2-field_63a3365490c7d}79: {type: 'input', originalContent: 'Sustainability', instance: input#acf-field_6380e05ce19d8-field_63a3362f90c7a-field_63a3363f90c7b-row-3-field_63a3365490c7d}80: {type: 'input', originalContent: 'Home - Portuguese Draft', instance: input#title}81: {type: 'input', originalContent: 'pt-home', instance: input#post_name.large-text}82: {type: 'textarea', originalContent: 'See how Superfy delivers sustainable smart resource management solutions through technology', instance: textarea#acf-field_63987767b683a-field_6398777db683b}83: {type: 'textarea', originalContent: 'At Superfy, we specialise in waste and recycling t… to optimise operations and drive sustainability.', instance: textarea#acf-field_63878589fca23-field_637ca09b9222c}84: {type: 'textarea', originalContent: 'A wide range of modules to digitize your waste and…rogrammes and reduce your environmental impact.\n\n', instance: textarea#acf-field_6387c457e65ea-field_6387c457e65ec}85: {type: 'textarea', originalContent: 'Controlink is your partner for the latest new tech… contact our representative at Controlink today.\n', instance: textarea#acf-field_637def497c68b-field_63b6afc912d9a}86: {type: 'textarea', originalContent: '', instance: textarea#acf-field_637def497c68b-field_637df33280412-row-0-field_637df3eb80414}87: {type: 'textarea', originalContent: '', instance: textarea#acf-field_637def497c68b-field_637df33280412-acfcloneindex-field_637df3eb80414}88: {type: 'textarea', originalContent: '', instance: textarea#acf-field_637f412dabf61-field_637f4ce5abf63}89: {type: 'textarea', originalContent: 'A collection of case studies that demonstrate how …fited countless companies and cities worldwide. \n', instance: textarea#acf-field_637f8a8fcfc4e-field_637f8a8fcfc50}90: {type: 'textarea', originalContent: 'Providing prompt and efficient support on your journey to success', instance: textarea#acf-field_637ff10affdb6-field_63a32ea24c478}91: {type: 'textarea', originalContent: 'Get a flexible pricing based on your needs. Unders…cost optimization, and request a custom proposal.', instance: textarea#acf-field_6380013640810-field_63a333e5ebc2d}92: {type: 'textarea', originalContent: 'Create and manage your waste management assets with your smart bins', instance: textarea#acf-field_6380013640810-field_6380036340815-row-0-field_6380044a40818}93: {type: 'textarea', originalContent: 'Create, manage and analyze your waste management assets with your smart bins', instance: textarea#acf-field_6380013640810-field_6380036340815-row-1-field_6380044a40818}94: {type: 'textarea', originalContent: 'Implement a customized solution for all your sustainability, waste and recycling workflow needs', instance: textarea#acf-field_6380013640810-field_6380036340815-row-2-field_6380044a40818}95: {type: 'textarea', originalContent: '', instance: textarea#acf-field_6380013640810-field_6380036340815-acfcloneindex-field_6380044a40818}96: {type: 'textarea', originalContent: 'Track and monitor your operational impact to drive…sions and meet your ESG reporting requirements. \n', instance: textarea#acf-field_6380e05ce19d8-field_63a3362290c79}97: {type: 'textarea', originalContent: '\x3Cscript charset="utf-8" type="text/javascript" src…117c-d03c-4e8e-85e9-f11cb044569b"\n });\n\x3C/script>', instance: textarea#acf-field_6380e05ce19d8-field_6380e318e19dc}length: 98[[Prototype]]: Array(0) post.php:1 Access to fetch at 'https://api.skelpo.com/v1/translations/translate' from origin 'https://www.superfy.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. translate.js?ver=6.3.2:152

   POST https://api.skelpo.com/v1/translations/translate net::ERR_FAILED 400 (Bad Request)

translateTextSkelpo @ translate.js?ver=6.3.2:152 acft_translate @ translate.js?ver=6.3.2:112 onclick @ post.php?post=9801&action=edit&translated=1:826 translate.js?ver=6.3.2:152

   Uncaught (in promise) TypeError: Failed to fetch
at translateTextSkelpo (translate.js?ver=6.3.2:152:26)
at acft_translate (translate.js?ver=6.3.2:112:23)
at HTMLAnchorElement.onclick (post.php?post=9801&action=edit&translated=1:826:135)

translateTextSkelpo @ translate.js?ver=6.3.2:152 acft_translate @ translate.js?ver=6.3.2:112 onclick @ post.php?post=9801&action=edit&translated=1:826 await in onclick (async) onclick @ post.php?post=9801&action=edit&translated=1:826

proggeramlug commented 1 year ago

Okay, I think we found and fixed the problem - try again. :)

XavaIreland commented 1 year ago

THANK YOU THANK YOU THANK YOU - It is working now.

nco-webdev commented 9 months ago

@proggeramlug hello,

got exactly the same issue here. Looks like the POST http request to translate strings is blocked by CORS issue. What should I do to fix this ?

I'm using DeepL to translate my content FYI.

Thank you

proggeramlug commented 9 months ago

@nco-webdev Can you provide me with a screenshot of the response?

nco-webdev commented 9 months ago

Thanks for the quick answer. Here an image with some useful debug info I guess. Also, it's not clear for me what should I encode in the License Key setting ? It's written Automatically assigned - you can manually adjust it if needed. but the plugin keeps adding undefined there so the error is probably here and not a CORS issue ?

debug

Thanks for your support 🙏

proggeramlug commented 9 months ago

@nco-webdev Can you confirm you have the newest version of the plugin ? (latest from github preferably)

It's not a CORS issue, that's just the browser interpretation for it. The license key is somehow not properly assigned and saved. Could you go into the settings of the plugin and see if there is any call to api.skelpo.com/v1/license/...

If that doesn't help email us at info [at] skelpo.com, ideally with a login to your Wordpress and someone will take a deeper look.

funkhaus-wout commented 1 month ago

We still encounter problems with the undefined API key. Is this issue resolved yet? We would love to try your plugin!

proggeramlug commented 1 month ago

@funkhaus-wout do you have a screenshot of the error? are you using the newest version from github?

funkhaus-wout commented 1 month ago

When running the plugin locally, we are getting a license-key, which we can use on our production environment. So the problem is solved by now, but when installing on production, the license-key stays Undefined.

Production has SSL activated, and has all the same PHP settings as our local setup

proggeramlug commented 1 month ago

@funkhaus-wout Do you mind emailing at info@skelpo.com with concrete domains? Ideally with some (temp.) admin login so I can see whats happening there.