mindstellar / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
https://docs.mindstellar.com/
GNU General Public License v3.0
88 stars 49 forks source link

NOTICE: Undefined indexes in hDefines.php #446

Closed eurobank closed 2 years ago

eurobank commented 2 years ago

Osclass 5.1dev and PHP 7.4.x

Those (if i remember right) are so old as Osclass script:

2021-11-25 13:37:43 - NOTICE: Undefined index: pk_i_id in /home/oc-includes/osclass/helpers/hDefines.php on line no 586 Error Code:8

2021-11-25 13:37:43 - NOTICE: Undefined index: s_title in /home/oc-includes/osclass/helpers/hDefines.php on line no 588 Error Code:8

2021-11-25 13:37:43 - NOTICE: Undefined index: fk_i_category_id in /home/oc-includes/osclass/helpers/hDefines.php on line no 594 Error Code:8

If i also remember correctly some reply from dev101 in the RIP Osclass forums, those are due to Bing search engine. Not sure if they are.

navjottomer commented 2 years ago

I have made some changes, will show a more helpful warning. But really depends on the usage of osc_item_url, osc_premium_url. If someplace it is showing that, we get to know the full trace to really fix this.

eurobank commented 2 years ago

@navjottomer

After the code changes, i see this:

2021-12-10 11:24:53 - USER_WARNING: Item is not an array or does not have the necessary variables in /home/public_html/oc-includes/osclass/helpers/hDefines.php on line no 615 Error Code:512

Does it help?

navjottomer commented 2 years ago

@navjottomer

After the code changes, i see this:

2021-12-10 11:24:53 - USER_WARNING: Item is not an array or does not have the necessary variables in /home/public_html/oc-includes/osclass/helpers/hDefines.php on line no 615 Error Code:512

Does it help?

What was the requested url

eurobank commented 2 years ago

How can i find that?

navjottomer commented 2 years ago

It should be in error log.

On Sat, 11 Dec, 2021, 7:16 pm eurobank, @.***> wrote:

How can i find that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mindstellar/Osclass/issues/446#issuecomment-991649639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDQSOXF3JMRKILNZFVMDTUQNI2TANCNFSM5JGTXAFQ .

eurobank commented 2 years ago

Nope. Nothing else. Just that in the debug log.

I tried using the date and time to find something in the RAW website logs. Hard to find BUT in those time ranges, all i see are some crapy Megaindex.ru hitting heavily.

navjottomer commented 2 years ago

Share couple lines of log.

eurobank commented 2 years ago

GET /search/region,782051/category,152/sShowAs,gallery/sOrder,dt_pub_date/iOrderType,desc HTTP/1.1" 200 12582 "-" "Mozilla/5.0 (compatible; MegaIndex.ru/2.0;

GET /search/iPage,2/region,782046/category,food-entertainment/sOrder,i_price/iOrderType,asc/sShowAs,gallery

GET /search/region,782051/category,152/sShowAs,list/sOrder,dt_pub_date/iOrderType,desc

eurobank commented 2 years ago

pls do not spend much time and effort on this. it is harmless (after all those years).

navjottomer commented 2 years ago

pls do not spend much time and effort on this. it is harmless (after all those years).

GET /search/region,782051/category,152/sShowAs,gallery/sOrder,dt_pub_date/iOrderType,desc HTTP/1.1" 200 12582 "-" "Mozilla/5.0 (compatible; MegaIndex.ru/2.0;

GET /search/iPage,2/region,782046/category,food-entertainment/sOrder,i_price/iOrderType,asc/sShowAs,gallery

GET /search/region,782051/category,152/sShowAs,list/sOrder,dt_pub_date/iOrderType,desc

Do you get this error on these URLs? BTW this could be a theme related issue too, this function can be called everywhere and will throw error messages when required variables are not provided. I am closing this as without the steps to reproduce this, it's impossible to fix this.