Getting asked to register in the BACKEND!

14 years 8 months ago #107057 by carlosleon0615
Replied by carlosleon0615 on topic Re:Getting asked to register in the BACKEND!

If your other super admins are working fine. Then your super admin account may have been messed up by you deleting directly from the database.

No, my other superadmins are exhibiting the same issue. I was mistaken the first time. Here's what I wrote in my previous post explaining:

And this happens for any superadmins. In my previous test, I must have been logged in the frontend with the new superadmin I had created and that's why it was working in the backend.


The hwdvideoshare developer confirmed he uses some frontend code in the backend:

...the anti-leech system generates the video file URL through the frontend

Here's the thread: Error in backend: Video Not Found.

By knowing this, the only questions that needs to be answered are:
1. Is it "expected" that a superadmin needs to be logged in into the frontend in order for a component (using some frontend code in the backend) to work correctly?

2. When a superadmin is NOT logged in into the frontend, is it expected that the registration page appears embedded in the backend upon trying to execute some actions (that use frontend code in the backend)?

3. Is it possible that CBSubs might be blocking some functionality that gets done automatically (this is, scheduled by the component itself) from time to time?

Would you mind replying the above 3 questions? If the first 2 are expected then there's no need to do reinstall as I will find the very same issues. If they are Not expected, then I'll be happy to perform a re-install to get to the bottom of the issue.

Thanks krileon!

Carlos

Please Log in to join the conversation.

14 years 8 months ago #107065 by krileon
Replied by krileon on topic Re:Getting asked to register in the BACKEND!
  1. Yes, the component is developed poorly. Backend should NOT execute Frontend code, ever. It is actually the reverse. Their anti-leech needs to be executed from a backend script, this is typically a components "class", which contains a mass of functions used by the component as a whole (frontend and backend). This class should be placed in the backend files (administrator/components/etc...).
  2. Yes, as frontend login and backend login have 2 different flags.
  3. No, CBSubs is just doing its job, see number 2.

You should urge the developer to restructure their component properly, the backend should never execute frontend code, as again they are 2 different flags. The frontend should use a backend class file if functions are to be shared between 2 locations. This is done by using the following example:

administrator/components/com_mycomponent/mycomponent.class.php

This file is then included into the top of:

components/com_mycomponent/mycomponent.php

Like: require_once( 'administrator/components/com_mycomponent/mycomponent.class.php' );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

14 years 8 months ago #107158 by carlosleon0615
Replied by carlosleon0615 on topic Re:Getting asked to register in the BACKEND!
Ok. Looks like what I'm seeing is "expected" then. I think it would be helpful to add some documentation about this behavior in the user manual or tooltips or somewhere. Something like:
"WARNING: When a component uses frontend code to perform some of its backend operations (not common and not recommended), you will need to login into the frontend in order to be able to perform those operations in the backend. Otherwise the operation might fail or you might even see the registration page embedded in the backend asking you to register and subscribe whenever you try performing one of those operations".

After all, I don't think it'll be useful for me to perform a full clean installation. If you think this will still be useful and would help find anything about CBSubs that should be fixed, please let me know.

3. No, CBSubs is just doing its job, see number 2.

What I meant is that if a task, such as re-generating playlists, is performed automatically (this is, NOT when anyone is necessarily logged in, but somehow the task is scheduled to be executed in regular periods such as every 5 hours) AND this task is using front-end code, would CBSubs block it from executing?

Thanks,

Carlos

Please Log in to join the conversation.

14 years 8 months ago #107170 by krileon
Replied by krileon on topic Re:Getting asked to register in the BACKEND!
No, CB doesn't block automatic operations performed by the code.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds

Facebook Twitter LinkedIn