Advertisement

user edit page - save and save &close buttons not working Topic is solved

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
luigizangaro
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 31, 2023 12:22 pm

user edit page - save and save &close buttons not working

Post by luigizangaro » Fri Sep 01, 2023 7:35 am

Hello ,
I'm using joomla 4.3.3

All of a sudden on the user edit page the save and save&close buttons don't work, they seem to be disabled.
I don't know precisely what i di, i was adjusting access and permission for uploading files by users with tfupload
then i installe dsome extensions for file restrictions and i disabled them but it still doesnt work
I che all
Superuser permissions are all checked green on everywhere in the permissions list.
Can anybody help me?
Btw, following a hint of Toivo in this forum for a similar post i checked the F12 tab for errors in the page and i get 5 errors, but i'm not good enough to understand where the problem is.

p.s btw, i can enable or disable users from the user manage page, but i can't change any settings in the user edit page, not even mine, because the save button doesn't work.

The highlighted entry in the bigger screenshot is what happend when i click on "save"
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1872
Joined: Tue Jun 30, 2020 12:17 pm

Re: user edit page - save and save &close buttons not working

Post by Pavel-ww » Fri Sep 01, 2023 9:09 am

Hi. Usually, when these buttons do not work, cleaning the cache in Joomla helps. Errors on your screenshots are not informative. It is necessary to go on the links indicated in errors and study the source code.

luigizangaro
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 31, 2023 12:22 pm

Re: user edit page - save and save &close buttons not working

Post by luigizangaro » Fri Sep 01, 2023 9:28 am

Hello, and thank you for your help ....

Here is the file with the file core.min.js

Code: Select all

const uriAttributes=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,allowedAttribute=(e,t)=>{const o=e.nodeName.toLowerCase();return t.includes(o)?!uriAttributes.has(o)||Boolean(SAFE_URL_PATTERN.test(e.nodeValue)||DATA_URL_PATTERN.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(o)))};function sanitizeHtml(e,t,o){if(!e.length)return e;if(o&&"function"==typeof o)return o(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),n=[].concat(...r.body.querySelectorAll("*"));for(const e of n){const o=e.nodeName.toLowerCase();if(!Object.keys(t).includes(o)){e.remove();continue}const r=[].concat(...e.attributes),n=[].concat(t["*"]||[],t[o]||[]);for(const t of r)allowedAttribute(t,n)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}const ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,DATA_ATTRIBUTE_PATTERN=/^data-[\w-]*$/i,DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN,DATA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[],button:["type"],input:["accept","alt","autocomplete","autofocus","capture","checked","dirname","disabled","height","list","max","maxlength","min","minlength","multiple","type","name","pattern","placeholder","readonly","required","size","src","step","value","width","inputmode"],select:["name"],textarea:["name"],option:["value","selected"]};window.Joomla=window.Joomla||{},window.Joomla.editors=window.Joomla.editors||{},window.Joomla.editors.instances=window.Joomla.editors.instances||{},window.Joomla.Modal=window.Joomla.Modal||{current:"",setCurrent:e=>{window.Joomla.Modal.current=e},getCurrent:()=>window.Joomla.Modal.current},(e=>{let t;e.extend=(e,t)=>{let o=e;return null===e&&(o={}),[].slice.call(Object.keys(t)).forEach((e=>{o[e]=t[e]})),e},e.optionsStorage=e.optionsStorage||null,e.getOptions=(t,o)=>(e.optionsStorage||e.loadOptions(),void 0!==e.optionsStorage[t]?e.optionsStorage[t]:o),e.loadOptions=t=>{if(!t){const t=[].slice.call(document.querySelectorAll(".joomla-script-options.new"));let o=0;if(t.forEach((t=>{const r=t.text||t.textContent,n=JSON.parse(r);n&&(e.loadOptions(n),o+=1),t.className=t.className.replace(" new"," loaded")})),o)return}e.optionsStorage?t&&[].slice.call(Object.keys(t)).forEach((o=>{null!==t[o]&&"object"==typeof e.optionsStorage[o]&&"object"==typeof t[o]?e.optionsStorage[o]=e.extend(e.optionsStorage[o],t[o]):e.optionsStorage[o]=t[o]})):e.optionsStorage=t||{}},e.Text={strings:{},_:(t,o)=>{let r=t,n=o;const s=e.getOptions("joomla.jtext");return s&&(e.Text.load(s),e.loadOptions({"joomla.jtext":null})),n=void 0===n?r:n,r=r.toUpperCase(),void 0!==e.Text.strings[r]?e.Text.strings[r]:n},load:t=>([].slice.call(Object.keys(t)).forEach((o=>{e.Text.strings[o.toUpperCase()]=t[o]})),e.Text)},e.JText=e.Text,e.submitform=(e,t,o)=>{let r=t;const n=e;r||(r=document.getElementById("adminForm")),n&&(r.task.value=n),r.noValidate=!o,o?r.hasAttribute("novalidate")&&r.removeAttribute("novalidate"):r.setAttribute("novalidate","");const s=document.createElement("input");s.classList.add("hidden"),s.type="submit",r.appendChild(s).click(),r.removeChild(s)},e.submitbutton=(t,o,r)=>{let n=document.querySelector(o||"form.form-validate"),s=r;if("string"==typeof o&&null===n&&(n=document.querySelector(`#${o}`)),n){if(null==s){const e=t.split(".");let o=n.getAttribute("data-cancel-task");o||(o=`${e[0]}.cancel`),s=t!==o}s&&!document.formvalidator.isValid(n)||e.submitform(t,n)}else e.submitform(t)},e.checkAll=(e,t)=>{if(!e.form)return!1;const o=t||"cb",r=[].slice.call(e.form.elements);let n=0;return r.forEach((t=>{t.type===e.type&&0===t.id.indexOf(o)&&(t.checked=e.checked,n+=t.checked?1:0)})),e.form.boxchecked&&(e.form.boxchecked.value=n,e.form.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))),!0},e.isChecked=(e,t)=>{let o=t;if(void 0===o?o=document.getElementById("adminForm"):"string"==typeof t&&(o=document.getElementById(t)),o.boxchecked.value=e?parseInt(o.boxchecked.value,10)+1:parseInt(o.boxchecked.value,10)-1,o.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),!o.elements["checkall-toggle"])return;let r,n,s,l=!0;for(r=0,s=o.elements.length;r<s;r++)if(n=o.elements[r],"checkbox"===n.type&&"checkall-toggle"!==n.name&&!n.checked){l=!1;break}o.elements["checkall-toggle"].checked=l},e.tableOrdering=(t,o,r,n)=>{let s=n;void 0===s?s=document.getElementById("adminForm"):"string"==typeof n&&(s=document.getElementById(n)),s.filter_order.value=t,s.filter_order_Dir.value=o,e.submitform(r,s)},e.listItemTask=(t,o,r=null)=>{let n=r;n=null!==r?document.getElementById(r):document.adminForm;const s=n[t];let l,a=0;if(!s)return!1;for(;l=n[`cb${a}`],l;)l.checked=!1,a+=1;return s.checked=!0,n.boxchecked.value=1,e.submitform(o,n),!1},e.replaceTokens=e=>{if(!/^[0-9A-F]{32}$/i.test(e))return;[].slice.call(document.getElementsByTagName("input")).forEach((t=>{"hidden"===t.type&&"1"===t.value&&32===t.name.length&&(t.name=e)}))},e.request=t=>{const o=e.extend({url:"",method:"GET",data:null,perform:!0,promise:!1},t),r=(t,r)=>{const n=new XMLHttpRequest;if(n.open(o.method,o.url,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==o.method){const t=e.getOptions("csrf.token","");t&&(!o.url.startsWith("http:")&&!o.url.startsWith("https:")||o.url.startsWith(window.location.origin))&&n.setRequestHeader("X-CSRF-Token",t),"string"!=typeof o.data||o.headers&&o.headers["Content-Type"]||n.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(o.headers&&[].slice.call(Object.keys(o.headers)).forEach((e=>{"Content-Type"===e&&"false"===o.headers["Content-Type"]||n.setRequestHeader(e,o.headers[e])})),n.onreadystatechange=()=>{4===n.readyState&&(200===n.status?o.promise?t.call(window,n):t.call(window,n.responseText,n):r.call(window,n),o.onComplete&&!o.promise&&o.onComplete.call(window,n))},o.perform){if(o.onBefore&&!1===o.onBefore.call(window,n))return o.promise&&t.call(window,n),n;n.send(o.data)}return n};if(o.promise)return new Promise(((e,t)=>{o.perform=!0,r(e,t)}));try{return r(o.onSuccess||(()=>{}),o.onError||(()=>{}))}catch(e){return console.error(e),!1}},e.enqueueRequest=o=>{if(!o.promise)throw new Error("Joomla.enqueueRequest supports only Joomla.request as Promise");return t=t?t.then((()=>e.request(o))):e.request(o),t},e.sanitizeHtml=(e,t,o)=>sanitizeHtml(e,null==t?DefaultAllowlist:{...DefaultAllowlist,...t},o),e.ajaxErrorsMessages=(t,o)=>{const r={};if("parsererror"===o){const o=[];let n=t.responseText.trim();for(let e=n.length-1;e>=0;e--)o.unshift(["&#",n[e].charCodeAt(),";"].join(""));n=o.join(""),r.error=[e.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",n)]}else"nocontent"===o?r.error=[e.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:"timeout"===o?r.error=[e.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:"abort"===o?r.error=[e.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:t.responseJSON&&t.responseJSON.message?r.error=[`${e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} <em>${t.responseJSON.message}</em>`]:t.statusText?r.error=[`${e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} <em>${t.statusText}</em>`]:r.error=[e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return r}})(Joomla);

In the meantme i'll try to manually clean the cache via ftp... casue i did it many times but using ftp i see it's still full
Last edited by toivo on Tue Sep 05, 2023 12:32 am, edited 1 time in total.
Reason: mod note: code tags

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1872
Joined: Tue Jun 30, 2020 12:17 pm

Re: user edit page - save and save &close buttons not working

Post by Pavel-ww » Fri Sep 01, 2023 9:39 am

luigizangaro wrote: Fri Sep 01, 2023 9:28 am Here is the file with the file core.min.js
:D Nobody on forum will explore the code posted in a post in isolation from your site. Moreover, minified. Hiring someone to go this work by providing him/her with access to your site.
Last edited by Pavel-ww on Fri Sep 01, 2023 10:14 am, edited 1 time in total.

luigizangaro
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 31, 2023 12:22 pm

Re: user edit page - save and save &close buttons not working

Post by luigizangaro » Fri Sep 01, 2023 9:53 am

I cleared the cacxhe but nothing new ....

I installed some extensions and i tried to uninstall them but the uninstaller gave an error ... so i tried to manually delete them ..... maybe something gfot borken during these operations? I would just like to know how to get back to have ti working

luigizangaro
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 31, 2023 12:22 pm

Re: user edit page - save and save &close buttons not working

Post by luigizangaro » Fri Sep 01, 2023 10:07 am

The isvalid string in core.mini.js (as described in the error log)is this:

formvalidator.isValid(n)||e.submitform(t,n)}else e.submitform(t) ..... maybe i should change it to something different?

or maybe for what i understand, but i'm not a programmer, there's something that gives an unidentified value to a variable that makes thecore.mini.js script give an error of "can't read unidentified" (see error log)...

Thank you for time in advance ....to anybody who can help me... the site is online on free cloudaccess, i don't know how to reset files and if it's possible to just upload joomla 4.3.3 (via ftp) new files from my pc (excpet the installation folder and the configutation.php .. i don't know if doing this i will make an incredible mess or not....

User avatar
ceford
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3281
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: user edit page - save and save &close buttons not working

Post by ceford » Fri Sep 01, 2023 8:22 pm

Your first image shows that a javascript file has failed to load and that has led to other JavaScript errors. Also you have fields that are not present in a standard Joomla user profile. So you must be using third party extensions that are faulty. You need to find which extension uses imageupload.js (or imageupload.min.js) and fix it.

jovanddd
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Apr 09, 2022 2:38 pm
Location: Beograd
Contact:

Re: user edit page - save and save &close buttons not working

Post by jovanddd » Fri Sep 01, 2023 9:23 pm

do you have backup?

luigizangaro
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 31, 2023 12:22 pm

Re: user edit page - save and save &close buttons not working

Post by luigizangaro » Mon Sep 04, 2023 6:50 pm

hi, no i didnt' have a recent backup ... anyway i solved itr.... inspecting the errors i found something like "injecting multifactor authentication into the page ".....
i disabled the plugins for mfa and it gfot bacxk to normal ...

looks like it didn't validate the "user edit" form in the administrator backend because it was missing the necesssary mfa authentications ...

.I know it's strange.. but it was solved with this

Thank you for your help

Advertisement

Locked

Return to “General Questions/New to Joomla! 4.x”