[XenDACH] LimitLanguageUsage

[XenDACH] LimitLanguageUsage 2.0.40

No permission to download

duderuud

Well-known member
Missed the rebuild option so seemed stuff was missing. I re-uploaded all the files and all was well again :)
 

sami simo

Well-known member
Hi @mcatze, I have installed [XenDACH] Limit Language Usage 2.0.3 yesterday and today I am having about 977 errors like this one:
  • ErrorException: [E_NOTICE] Trying to get property 'xd_user_selectable' of non-object
  • src/addons/XenDACH/LimitLanguageUsage/XF/Pub/Controller/Misc.php:17
  • Generated by: Unknown account
  • Jul 9, 2019 at 1:46 AM
Stack trace
#0 src/addons/XenDACH/LimitLanguageUsage/XF/Pub/Controller/Misc.php(17): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/domain...', 17, Array)
#1 src/XF/Mvc/Dispatcher.php(321): XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc->actionLanguage(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'Language', Object(XF\Mvc\RouteMatch), Object(XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc), NULL)
#3 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc), NULL)
#4 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#6 src/XF.php(390): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Request state
array(4) {
["url"] => string(134) "/misc/language?language_id=4&redirect=http%3A%2F%2Fdomain.com%2Fmisc%2Flanguage%3Fredirect%3D%252Ftags%252Fxnd-salxh-baghfar%252F"
["referrer"] => bool(false)
["_GET"] => array(2) {
["language_id"] => string(1) "4"
["redirect"] => string(76) "http://domain.com/misc/language?redirect=/tags/xnd-salxh-baghfar/"
}
["_POST"] => array(0) {
}
}
 

sami simo

Well-known member
I am using XF 2.1.2 , no tags addon is installed, here is another variation of the error:

ErrorException: [E_NOTICE] Trying to get property 'xd_user_selectable' of non-object src/addons/XenDACH/LimitLanguageUsage/XF/Pub/Controller/Misc.php:17
Generated by: Unknown account Jul 9, 2019 at 1:10 PM
Stack trace
#0 src/addons/XenDACH/LimitLanguageUsage/XF/Pub/Controller/Misc.php(17): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/domain...', 17, Array)
#1 src/XF/Mvc/Dispatcher.php(321): XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc->actionLanguage(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'Language', Object(XF\Mvc\RouteMatch), Object(XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc), NULL)
#3 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc), NULL)
#4 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#6 src/XF.php(390): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Request state
array(4) {
["url"] => string(121) "/misc/language?language_id=4&redirect=http%3A%2F%2Fdomain.com%2Fmisc%2Flanguage%3Fredirect%3D%252Fpage%252F6774%252F"
["referrer"] => bool(false)
["_GET"] => array(2) {
["language_id"] => string(1) "4"
["redirect"] => string(63) "http://domain.com/misc/language?redirect=/page/6774/"
}
["_POST"] => array(0) {
}
}
 

mcatze

Well-known member
There is something wrong with your redirect string. Did you have a link for me?
Can you show me a screenshot of your language options in acp?
 

nocte

Well-known member
I found a bug:

In XenDACH\LimitLanguageUsage\XF\Pub\Controller\Misc you should change this:

if (!$visitor->is_admin && !$language->xd_user_selectable)

into:

if (!$language || (!$visitor->is_admin && !$language->xd_user_selectable))

Otherwise a manipulated (non-existing) language_id would cause a server error. With this fix it only causes a no permission error, if someone plays around with the language ids. :)
 

mcatze

Well-known member
It was a fault during bump-version. I want to step from 2003070 to 2004070 and this was the result. Maybe a bug? :unsure:
 

mcatze

Well-known member
The last time i bump to 2003070 and get 2.0.3, but i think i bump this time just --version-id 2004070 without --version-string 2.0.4, so this was the result.
 
Top