*

jcarrolo01

  • *****
  • 256 posts
Small issue related with 4xx response codes
« on: February 21, 2021, 10:30:15 PM »
Hello...

This post is only to report a small issue in zara Theme / osClass core


When i scan the main page, that is reporting a 4xx error, that error is related with a user try to select a location

Code: [Select]
  <div id="location-def" class="noselect">
    <a href="<?php echo osc_item_send_friend_url(); ?>" id="home-loc-open" class="l-button tr1">
      <span class="l-img">
        <i class="fa fa-map-marker"></i>
      </span>

      <span class="l-text tr1">
        <?php echo $loc_text?>
      </span>
    </a>
  </div>



Best Regards
João Carrolo
« Last Edit: February 21, 2021, 10:32:41 PM by jcarrolo01 »

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #1 on: February 22, 2021, 08:14:02 AM »
@jcarrolo01
How to reproduce?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #2 on: February 22, 2021, 09:17:05 AM »
Hello.

Please check the image...

I have another ways to check, but this is one of the ways...




If you need some more info, please let me know.

Best regards
Joao carrolo

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #3 on: February 22, 2021, 11:37:06 AM »
@jcarrolo01
I am not sure, could not get it on demo.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #4 on: February 22, 2021, 11:55:55 AM »
@jcarrolo01
I am not sure, could not get it on demo.

Afternoon when i arryve to home i will return with more details.

Best regards
Joao carrolo

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #5 on: February 22, 2021, 10:00:50 PM »
There is a free chrome extension with name "Free Backlink Checker by LRT" by LinkResearchTools the extension check all broken  links, i only have one, please see Img1 (Green is ok, RED is Brocken links).

I can use also the screaming frog app, and the error 404 is there (Please see image2).


I discover this because i working on organic keywords, and when i inspect that in one site, they the site return a error telling cant perform the operation because i have 404 errors on page...


In:
Code: [Select]
\oc-includes\osclass\helpers\hDefines.php
I found the code:
Code: [Select]
/**
 * Gets url of send a friend (current item)
 *
 * @return string
 */
function osc_item_send_friend_url() {
  if ( osc_rewrite_enabled() ) {
    return osc_base_url() . osc_get_preference('rewrite_item_send_friend') . '/' . osc_item_id();
  } else {
    return osc_base_url(true) . '?page=item&action=send_friend&id=' . osc_item_id();
  }
}

Depending what comes in osc_item_id() we can have the error described on screeshots
Code: [Select]
www.klassificados24.com//_i
I think the error is arround this function....


Best Regards
João Carrolo
« Last Edit: February 22, 2021, 10:04:29 PM by jcarrolo01 »

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #6 on: February 23, 2021, 07:26:23 AM »
@jcarrolo01
In case osc_item_id() or osc_item() is not available, function will return such URL.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #7 on: February 23, 2021, 10:45:11 AM »
Yes, exactlly!!!

If i force to any number i think it will not work because we are sending the kisting to a friend...

There is another way to pick a location?? I can place directlly a list of the location, like in bender or sigma theme, but i think dont feet very well on this theme...

Best regards
Joao carrolo

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #8 on: February 23, 2021, 11:17:51 AM »
@jcarrolo01
I am not able to reproduce that I would get such 404 anywhere so I have no idea what is problem or where.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #9 on: March 01, 2021, 11:38:29 PM »
@jcarrolo01
I am not able to reproduce that I would get such 404 anywhere so I have no idea what is problem or where.

Hello..

Chrome Web Developer Check Image 1

Search in inspector console the code of select location
Code: [Select]
https://zara.mb-themes.com/item/send-friend/0
Paste that address in address bar and press enter, before in developers tools press "network" , and the 404 error is there (Please check image2...



Best Regards
João Carrolo

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #10 on: March 02, 2021, 08:28:53 AM »
In item friend file, try to go to bottom of page and find:
Code: [Select]
    if(!isset($type) || $type == '') {
above this code add:
Code: [Select]
    if(@$type == 'location_select') {
      exit;
    }

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #11 on: March 02, 2021, 10:35:07 PM »
Hello...

IUnfortunatlly the 404 error still there

I impement the change:
Code: [Select]
  <?php 

    
if(@$type == 'location_select') {
      exit;
    }

    if(!isset(
$type) || $type == '') {
      if(
count($msg) > 0) {
        foreach(
$msg as $m) {
          if(
$m[type] == 'error') {
            
osc_add_flash_error_message($m[msg]);
          } else if (
$m[type] == 'success' || $m[type] == 'ok') {
            
osc_add_flash_ok_message($m[msg]);
          } else {
            
osc_add_flash_message($m[msg]);
          }
        }
      }

      
header('Location:'.osc_item_url());
    } 
  
?>

Best Regards
João Carrolo

*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #12 on: March 03, 2021, 07:10:08 AM »
@jcarrolo01
I am not able to get 404 anyhow I am trying
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Small issue related with 4xx response codes
« Reply #13 on: March 03, 2021, 10:05:23 AM »
Hello...

I think i should report issues because your success is my success, and this helps allot having god plugins and themes.

I wil try a explanation:
Home page generate a link "https://zara.mb-themes.com/item/send-friend/0" (i made this in your demo site) related with location selector, if you paste this link in address bar you will see imediatly the error, if you see with chrome dev tools in network option you will see the 404 errors... google boot, bing boot and others tools follow the links and this link in home page can give some problems crawling the site..


I hope you can see the error..


Best regards
Joao carrolo


*

MB Themes

Re: Small issue related with 4xx response codes
« Reply #14 on: March 03, 2021, 10:36:50 AM »
@jcarrolo01
But you are not never ever putting that into link bar, because additional parameters are attached to that link and it will not be 404 anymore.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots