In all url getting [object%20object] in crawl bot. How to fix this Image broken links?
Unanswered
American black bear posted this in #help-forum
American black bearOP
I am using next js 14
In all url getting [object%20object] in crawl bot. How to fix this
Image broken links?
In all url getting [object%20object] in crawl bot. How to fix this
Image broken links?
41 Replies
can you show the code
American black bearOP
hmm! it's my company private repo! but can i know show code mean, what to show whole code or any specific thing?
I think this error is coming from a Link and Image component?
and you render the href like
/someurl/${item} this?American black bearOP
yeah! like i have blogs in my site
this site
example link
@Ray and you render the href like `/someurl/${item}` this?
I mean console.log(item) to see
look like you passing a object to it
American black bearOP
no! we didt' do like that. okay but i check like that
all the href are static?
American black bearOP
no no! this blog are dynamic
oh check the href in all the <Link />
American black bearOP
sure!
here i am geeting string data only!
but thansk for the hint! 🙂
is the [object%20object] url come from your domain?
American black bearOP
ohh! yeah i got it
really thanks @Ray
cool np
American black bearOP
# DynamicBlog.jsx
https://codefile.io/f/KlwNJQeizu
---
# page.jsx
https://codefile.io/f/YFq3fiBXzE
--------
@Ray once more suggestion can i ask. In blog I was show h1 tag. but after render the page it's show in website. but if I inspect, in view-source that h1 tag was now show. ( even i try to put h1 tag manually )
after render page that h1 tag is not show in
https://codefile.io/f/KlwNJQeizu
---
# page.jsx
https://codefile.io/f/YFq3fiBXzE
--------
@Ray once more suggestion can i ask. In blog I was show h1 tag. but after render the page it's show in website. but if I inspect, in view-source that h1 tag was now show. ( even i try to put h1 tag manually )
after render page that h1 tag is not show in
view-source it's also little bit affect the site seo. so i askingwhere is the h1?
most likely because you fetching the data in useEffect?
all blog this h1 tag missing happen!
@Ray most likely because you fetching the data in useEffect?
American black bearOP
yes. it's a client side render page
you should render it server side
American black bearOP
yeah! but i am just asking it's possible to do form client side?
i don't think so 

useEffect only run on client
American black bearOP
okay! if no choice we will change this to server side!
you should at least fetch the metadata server side
@Ray you should at least fetch the metadata server side
American black bearOP
yup! thanks again 

np