Skip to main content
Social Login Started by ahrasis · · Read 12370 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Re: Social Login

Reply #15

Sorry. I forgot this addon altogether. I'll see to it soon.

Re: Social Login

Reply #16

While fixing the addon's broken code I got this error:
Quote "PHP message: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function OASL_PreLoad(), 0 passed in /sources/Subs.php on line 3848 and exactly 2 expected in /sources/addons/OASL/OASL.subs.php:921
Stack trace:
#0 /sources/Subs.php(3848): OASL_PreLoad()
#1 /sources/Load.php(135): call_integration_hook('integrate_pre_l...')
#2 /index.php(102): reloadSettings()
#3 {main}
  thrown in /var/www/clients/client2/web1/web/sources/addons/OASL/OASL.subs.php on line 921"

Line 921 is this function:
Code: [Select]
function OASL_PreLoad(&$actionArray, &$adminActions)
{
global $context, $modSettings;

if (!empty($modSettings['oasl_api_subdomain']))
$context['html_headers'] .= '<script type="text/javascript" src="//' . htmlspecialchars ($modSettings['oasl_api_subdomain']) . '.api.oneall.com/socialize/library.js"></script>';

}

The latest package (containing the above error) is attached.

Re: Social Login

Reply #17

I forgot why did I want to preload the above but I think it has to be put in the header so I did minor changes to to the hook. Now, it get to another error causing admin page not accessible (it will get you back to forum frontpage):
Code: [Select]
A non well formed numeric value encountered
index.php?action=admin;area=packages;sa=install2;package=OASL.zip;pid=0
/sources/ext/cssmin.php
Line: 769
What does this means anyway?

The latest package is attached.[1]
I think I need to rewrite this from the beginning so I know what I did last time.

Re: Social Login

Reply #18

Would you mind having a look and see what line 769 of cssmin.php looks like?
Bugs creator.
Features destroyer.
Template killer.

Re: Social Login

Reply #19

@emanuele, the above could be due to using php7.1 though (int) seems in place. Using php5.6 seems fine though.

Code: [Select]
765: 	    private function normalize_int($size)
766:     {
767:         if (is_string($size)) {
768:             switch (substr($size, -1)) {
==>769:                 case 'M': case 'm': return $size * 1048576;
770:                 case 'K': case 'k': return $size * 1024;
771:                 case 'G': case 'g': return $size * 1073741824;
772:             }
773:         }
774:
775:         return (int) $size;

Anyway, the package has re-converted and so far it went smooth except for minor error. I attached it here for everybody's testing.

Re: Social Login

Reply #20

Missed changing $sourcedir to SOURCEDIR in subs file. I attached here the latest one. Hopefully, this time is more useful. You can check https://elkarte.sch.my by clicking on its login and registration button.

Re: Social Login

Reply #21

Can you report the bug?
It's in SiteCombiner:
Code: [Select]
$compressor = new CSSmin($this->_cache);
should be:
Code: [Select]
$compressor = new CSSmin();
Bugs creator.
Features destroyer.
Template killer.

Re: Social Login

Reply #22

Done.

Re: Social Login

Reply #23

Note that the error is still there when I did the required change inn SiteCombiner and tried installing two more addons (after the above post). Do I have to clear caches / cookies or anything first?

EDITED: I cleared the caches and the cookies but the error is still there.
Last Edit: March 24, 2017, 09:17:49 am by ahrasis

Re: Social Login

Reply #24

Please try the attached version of cssmin.php (for sources/ext)

@emanuele‍ if this fixes the issue we should add this to 1.0.10 since its another php7 fix :(

Re: Social Login

Reply #25

Thank you very much. That fixed it alright.

 

Re: Social Login

Reply #26

Hooray! :D