linkingyou / contao-easy_exclude Goto Github PK
View Code? Open in Web Editor NEWContao extension easy_exclude
Contao extension easy_exclude
Frage: Wird die Erweiterung weiter aktualisiert und eine Version für Contao 5 veröffentlicht?
Finanzielle Unterstützung ist möglich.
Bitte um kurze Rückmeldung, Danke.
Hallo,
unter Contao 4.13.8 und PHP 8.1 wird folgender Fehler in der ausgegeben:
[2022-08-30T01:11:54.520667+02:00] request.INFO: Matched route "_profiler_open_file". {"route":"_profiler_open_file","route_parameters":{"_route":"_profiler_open_file","_controller":"web_profiler.controller.profiler::openAction"},"request_uri":"https://domain.de/_profiler/open?file=vendor%2Flinking-you%2Feasy_exclude%2Fsrc%2FBackend%2FEasyExclude.php&line=39","method":"GET"} [] [2022-08-30T01:12:33.358197+02:00] request.INFO: Matched route "contao_backend". {"route":"contao_backend","route_parameters":{"_route":"contao_backend","_scope":"backend","_token_check":true,"_controller":"Contao\\CoreBundle\\Controller\\BackendController::mainAction"},"request_uri":"https://domain.de/contao","method":"GET"} [] [2022-08-30T01:12:33.361639+02:00] security.DEBUG: Read existing security token from the session. {"key":"_security_contao_backend","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} [] [2022-08-30T01:12:33.376575+02:00] security.DEBUG: User was reloaded from a user provider. {"provider":"Contao\\CoreBundle\\Security\\User\\ContaoUserProvider","username":"BENUTZERNAME"} [] [2022-08-30T01:12:33.469831+02:00] request.CRITICAL: Uncaught PHP Exception ErrorException: "Warning: Undefined global variable $EasyExclude" at /www/htdocs/w1234567/verzeichnisname/vendor/linking-you/easy_exclude/src/Backend/EasyExclude.php line 39 {"exception":"[object] (ErrorException(code: 0): Warning: Undefined global variable $EasyExclude at /www/htdocs/w1234567/verzeichnisname/vendor/linking-you/easy_exclude/src/Backend/EasyExclude.php:39)"} [] [2022-08-30T01:12:33.501211+02:00] security.DEBUG: Stored the security token in the session. {"key":"_security_contao_backend"} [] [2022-08-30T01:12:33.576672+02:00] app.DEBUG: Executing cron job "Contao\CoreBundle\Cron\LegacyCron::onMinutely" [] [] [2022-08-30T01:12:33.973865+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"269829"},"request_uri":"https://domain.de/_wdt/269829","method":"GET"} []
Bei aktivem Debug-Modus wird im Backend folgender Fehler ausgegeben:
Undefined global variable $EasyExclude in vendor/linking-you/easy_exclude/src/Backend/EasyExclude.php (line 39)
Contao 4.13.35
PHP 8.2.9
Running contao 4.13.14 under php 8.1.6 locally I get this error when trying to warm up dev-cache:
`CRITICAL [console] Error thrown while running command "cache:warmup --env=dev -v". Message: "Warning: Undefined array key "admin"" ["exception" => ErrorException { …},"command" => "cache:warmup --env=dev -v","message" => "Warning: Undefined array key "admin""]
In BackendUser.php line 168:
[ErrorException]
Warning: Undefined array key "admin"
Exception trace:
at /shared/httpd/contao413/vendor/contao/core-bundle/src/Resources/contao/classes/BackendUser.php:168
Contao\BackendUser->__get() at /shared/httpd/contao413/vendor/linking-you/easy_exclude/src/Backend/EasyExclude.php:218`
Leider Fehlermeldung in der Konsole wie im Titel.
https://www.subdomain.xyz.de/bundles/easyexclude/assets/easyExclude_src.min.js:1
const REQUEST_TOKEN=Contao.request_token;const CONTAO_LOADING="Loading data";var EasyExclude=new Class({Implements:[Options],options:{table:""},fields:null,usergroup:0,checkboxes:{},initialize:function(b){var a=this;this.setOptions(b);$("easyExclude_usergroup").addEvent("change",function(){a.fields=$$("div.easyExclude");a.usergroup=this.get("value");if(a.usergroup>0){a.cleanTheScreen();a.addCheckboxes();a.updateStates()}else{a.cleanTheScreen()}});window.addEvent("subpalette",function(){$("easyExclude_usergroup").fireEvent("change")})},updateStates:function(){var a=this;new Request.JSON({url:window.location.href,data:"isAjax=1&action=easyExcludeGetFieldRights&usergroup="+this.usergroup+"&table="+this.options.table+"&REQUEST_TOKEN="+REQUEST_TOKEN,onRequest:function(){AjaxRequest.displayBox(CONTAO_LOADING+" …")},onComplete:function(){AjaxRequest.hideBox()},onFailure:function(){alert("failed")},onSuccess:function(b,c){if(b.content){b.content.each(function(d){var e="easyExclude_"+d+"_"+a.usergroup;if($(e)){$(e).checked=true}})}a.changeBackgroundColor()}}).send()},addCheckboxes:function(){var a=this;this.fields.each(function(c){var b="easyExclude_"+a.filterForFieldName(c.get("class"))+"_"+a.usergroup;var d=null;if(a.checkboxes[b]){d=a.checkboxes[b]}else{d=new Element("input",{type:"checkbox",name:b,id:b,"class":"tl_checkbox easyExcludeCheckbox",events:{change:function(){a.saveChange(c,this)}}})}d.inject(c,"top")})},saveChange:function(c,e){var a=this;var b=(e.checked)?1:0;var d=new Request.JSON({url:window.location.href,data:"isAjax=1&action=easyExcludeSaveChange&usergroup="+this.usergroup+"&field="+a.filterForFieldName(c.get("class"))+"&table="+this.options.table+"&state="+b+"&REQUEST_TOKEN="+REQUEST_TOKEN,onRequest:function(){AjaxRequest.displayBox(CONTAO_LOADING+" …")},onComplete:function(){AjaxRequest.hideBox()},onFailure:function(){alert("failed")},onSuccess:function(g,f){a.changeBackgroundColor()}}).send()},filterForFieldName:function(b){var a=/easyExcludeFN_([\S]+)/i.exec(b);return a[1]},changeBackgroundColor:function(){$$("input.easyExcludeCheckbox").each(function(b){var a=b.getParent("div.easyExclude");if(b.checked){a.setStyle("background","#E4FFD4")}else{a.setStyle("background","#EBEBEB")}})},cleanTheScreen:function(){$$("input.easyExcludeCheckbox").each(function(b){var a=b.get("id");this.checkboxes[a]=b.dispose()}.bind(this));this.fields.each(function(a){a.setStyle("background","")})}});
CONTAO VER. 4.9
PHP 7.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.