Advertisement:

Author Topic: public-profile url format  (Read 4858 times)

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #105 on: April 18, 2019, 02:12:25 pm »
Exactly like my htacces . Now . Enable permalinks . See if works for whole website .  See if plugin works . Then disable permalinks .. see if plugin works again ..
Let see if others has same issue .

Your domain is the main domain or addon domain ?
Your osclass is inside public_html folder ?
« Last Edit: April 18, 2019, 02:15:29 pm by Web-Media »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #106 on: April 18, 2019, 11:54:04 pm »
Exactly like my htacces . Now . Enable permalinks . See if works for whole website .  See if plugin works . Then disable permalinks .. see if plugin works again ..
Let see if others has same issue .

Your domain is the main domain or addon domain ?
Your osclass is inside public_html folder ?

Not working! with Permalinks or without Permalinks!
with Permalinks = it redirects to yoursite.com/user-cris but shows 404.php content!
without Permalinks = it also redirects to yoursite.com/user-cris but shows main.php content!

- domain is main-domain
- i even replaced all the PLUGINS_PATH in index.php with (Path-to-your-Web-document-root + oc-content/plugins/) provided by host, but did the same error again! nothing changed!
- without user_profile plugin, whole website works great with or without Permalinks!
« Last Edit: April 18, 2019, 11:55:41 pm by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #107 on: April 19, 2019, 06:08:51 pm »
Did the user cris exist ?
Is user enabled  and active ?
Did you setup the redirect  to go to main page when username does not exist  or is not active ?
 404 from theme file or server 404 default page  ?
« Last Edit: April 19, 2019, 06:40:07 pm by Web-Media »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #108 on: April 19, 2019, 10:03:10 pm »
Did the user cris exist ?
Is user enabled  and active ?
Did you setup the redirect  to go to main page when username does not exist  or is not active ?
 404 from theme file or server 404 default page  ?
Did the user cris exist ? Yes
Is user enabled  and active ? Yes
Did you setup the redirect  to go to main page when username does not exist  or is not active ? No difference. I even changed to go to search.php but with Permalinks it shows the 404.php content and without Permalinks it shows main.php content! (But urls are not main.php or 404.php)
404 from theme file or server 404 default page  ? It dosnt show the 404.php in url, it just shows the content of 404.php in bender theme! Because i put a echo 'i am 404 in bender'; and it showed me that! (When i removed the 404.php in bender theme it showed the white page with the message: Not Found, Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.) This was when Permalinks On, whwn Permalinks is off always shows the main.php content no matter i choose main or search in plugin setting!

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #109 on: April 25, 2019, 12:46:01 pm »
Please someone tells us why @Web_media's plugin works great on localhost but NOT on server! Thanks,

https://github.com/web-media/user_profile

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #110 on: April 26, 2019, 09:32:14 am »
@Web-Media
Did you fix that issue?
Thanks

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #111 on: May 02, 2019, 11:34:31 am »
Really? In this forum no one knows why this plugin works on localhost but not on server?
If you don't wanna fix it, at least tell me the reason that this plugin dosnt work on the server!
I changed all the plugin path with server path but didn't work!
What could be that there is on localhost and not on server to prevent working?
Please leave your comments
Thanks
« Last Edit: May 03, 2019, 06:09:00 am by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #112 on: May 04, 2019, 03:48:03 am »
Please someone tests this plugin on server and let us know that works or not! Thanks!

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #113 on: May 04, 2019, 05:57:05 am »
@Web-Media
I found the issue!
i analyzed the plugin, user_profile_custom() function doesn't work on the server! why?
« Last Edit: May 07, 2019, 02:02:43 am by Sophia_OS »

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #114 on: May 08, 2019, 05:12:12 am »
Please one of the osclass Admins test this plugin on the server and confirm that doesn't work!
For me on localhost works, but on the server doesn't! And I'm trying to find out why!
Thanks

https://github.com/web-media/user_profile
« Last Edit: May 08, 2019, 05:15:53 am by Sophia_OS »

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #115 on: May 08, 2019, 09:18:26 am »
I'll look into  it  folowing days  and rewrite the code with some custom exit  statuses to identify the problem faster .

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #116 on: May 08, 2019, 10:44:46 am »
I'll look into  it  folowing days  and rewrite the code with some custom exit  statuses to identify the problem faster .

Thank you,
Just let you know that i analyzed the plugin and in index.php, function user_profile_custom() doesn't work on server! The reason is init_custom hook doesn't work on the server.
I'm waiting for your reply
Thanks

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: public-profile url format
« Reply #117 on: May 08, 2019, 12:47:31 pm »
There is  2 ways to land to user profile page .
Typing the url yoursite /var-username .. etc
Or cliking on user link on various parts of the website  and plugin redirect to custom page route .
Try accesing both to see if any methods has errors
Actually i've forgot to comment one line in the code index .php line 117
Code: [Select]
osc_add_route('cris', 'cris', 'cris' , osc_plugin_folder('user_profile/index.php') . 'views/cris.php', false, 'custom', 'pub_profile', __('Profile Page Of ') );

so if you have a user named cris there will be an error

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #118 on: May 08, 2019, 08:06:23 pm »
@Web-Media
1. There is no "cris" username on my website! That was just example!
2. On the server when i click or type public-profile of any user, it redirects to mysite.com/var-username but content of page is error404. That means it redirects to new url but website dosnt recognize that url! Its like you type a random word at the end of your website: mysite.com/thshdjfbeg and get error!
3. On the server, index.php, user_profile_redirect() function works good, that's why it redirects to new url.
But user_profile_custom() dosnt work, that's why it dosnt route the new url to public-profile. When i change the init_custom hook with before_html hook, function works but inside of the function $route variable gets empty!
4. Please just analize index.php -> function user_profile_custom() on the server. The problem is just this function.
Thank you!

Sophia_OS

  • Sr. Member
  • ****
  • Posts: 422
Re: public-profile url format
« Reply #119 on: May 10, 2019, 06:00:41 am »
@Web-Media
Any update?