• Resolved Kuzso

    (@kuzso)


    Hi!
    First, let me tell you, that this plugin is awesome!
    But I just went in an error, just like the title sais.
    This error comes up when a not logged in person or a subscriber trying to add something to the cart. When an admin trying this, the cart is working perfectly.

    Things that i made for the site:
    – Made a new category and menu
    – Disabled the admin bar for subscribers
    – Subscribers can’t reach wp-login page if logged in (redirected to main page)

    If I am logged in as an admin and put something in the cart, then i am go to the order page, everything is fine, but if then i am logging out without finishing the order, the order page change itself, which is nice, but before the send button it seem like loading infinite times the page header with the navigation.

    It is a bit annoying error, because i have no idea what can cause this..

    p.s. Sorry for my english, i just learning it.

    https://ww.wp.xz.cn/plugins/wppizza/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author ollybach

    (@ollybach)

    got a link ?

    Thread Starter Kuzso

    (@kuzso)

    I am sorry, but not right now.
    It is not finished yet, and its on localhost right now.

    Plugin Author ollybach

    (@ollybach)

    sorry, but then i cannot help you as it could be a number of things and i cannot begin to even guess

    Thread Starter Kuzso

    (@kuzso)

    Ok, thank you! If i can manage this, i will post here, if i can’t then i will post the link if its online.

    Plugin Author ollybach

    (@ollybach)

    ok

    one thing you ought to check though is the console – on chrome its
    ctr+shift+i ->console

    and see what it says there to start off with

    chances are – at a guess – there’s a javascript error that stops other javascript from executing

    Plugin Author ollybach

    (@ollybach)

    and – as a really wild guess – when you say

    >Subscribers can’t reach wp-login page if logged in (redirected to main page)

    you are also redirecting ajax requests

    (again , just a stab in the dark , but see if disabling whatever you did there solves this , in which case you will have to investigate how you are doing this…again though, just a wild guess

    about as much as i can say/suggest without seeing a page/link

    Thread Starter Kuzso

    (@kuzso)

    it is a bit fast, but admin-ajax or something like this pop up and loading the main page non-stop into the plugin’s area

    Maybe the mainpage redirecting causing this?

    Thread Starter Kuzso

    (@kuzso)

    Sorry, didnt see that u wrote before me.

    This worked!

    The redirecting checked that the user can or cannot edit posts and if cant then redirected to the main page and it was added to the admin_init..

    Thank you very much!

    Plugin Author ollybach

    (@ollybach)

    sorry, i don’t understand what it is you are saying

    either way i cannot tell without a link.

    just – for starters – stop the redirection you are doing and see what happens .

    Thread Starter Kuzso

    (@kuzso)

    I Cleared out the redirection and everything is working well..

    I think it is used the same way for checking logged in users like the plugin.

    So this managed the problem, thank you for pointing the right thing!

    Plugin Author ollybach

    (@ollybach)

    ok,

    you need to refine /edit the way you are doing your redirections then (or just use a plugin that does this without interfering with ajax requests)

    Plugin Author ollybach

    (@ollybach)

    glad i could help somewhat though

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Syntax Error – Unexpected Token’ is closed to new replies.