Jump to content
thirty bees forum
  • 0

oneall.com Module


AndyC

Question

Please could I have a bit of help here .. I have used this module for as long as I can remember.. It's been on the back burner for while now and am finally getting around to look into it.

I already have Facebook log in working correctly and logs me in fine.But it is not the case with Twitter, Everything works fine except when it comes to redirecting but to my page I get the error message below with a 500 page.

Now being nosy I read into on line 161 expect a 1, so I went there and found Tools::redirect ( ); so I tried making it (1 ); .. It got me past the 500 page but to a not found product page and it hadn't signed me in either.

So am hoping someone here can help if at all possible

 

Decoded exception

Too few arguments to function ToolsCore::redirect(), 0 passed in /home/edit out/public_html/modules/oneallsociallogin/controllers/front/register.php on line 161 and at least 1 expected

in file classes/Tools.php at line 218

Source file: classes/Tools.php

199:            }
200:
201:            $result .= sha1($entropy, true);
202:        }
203:
204:        return substr($result, 0, $length);
205:    }
206:
207:    /**
208:     * Redirect user to another page
209:     *
210:     * @param string       $url     Desired URL
211:     * @param string       $baseUri Base URI (optional)
212:     * @param Link         $link
213:     * @param string|array $headers A list of headers to send before redirection
214:     *
215:     * @since   1.0.0
216:     * @version 1.0.0 Initial version
217:     */
218:    public static function redirect($url, $baseUri = __PS_BASE_URI__, Link $link = null, $headers = null)
219:    {
220:        if (!$link) {
221:            $link = Context::getContext()->link;
222:        }
223:
224:        if (strpos($url, 'http://') === false && strpos($url, 'https://') === false && $link) {
225:            if (strpos($url, $baseUri) === 0) {
226:                $url = substr($url, strlen($baseUri));
227:            }
228:            if (strpos($url, 'index.php?controller=') !== false && strpos($url, 'index.php/') == 0) {

 

Thanks

Link to comment
Share on other sites

Recommended Posts

  • 0

The code we have just fixed is in the error execution branch (unfortunately). Which means that either line

        if (isset($this->context->cookie->oasl_data))

or lines

            // Extract the data.
            $data = json_decode($this->context->cookie->oasl_data, true);

            // Check data format.
            if (is_array($data))

evaluated to false. 

This is not a technical issue, but business-logic issue. This variable is either not set, or contains invalid content. Either way, you should definitely report this to the module developer. This won't be easy to fix, without deep knowledge of module design and data flow.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...