cancel
Showing results for 
Search instead for 
Did you mean: 

Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and try again.

Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and try again.

When we upload import product CSV file then after when we click on check data at that time page have only loading and loading and process stop and display.

Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and try again.


And displayed on log file.

How can we resolve this?

If you have any idea please share here.

Thank you.

 

10 REPLIES 10

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

Hello @Ashish_k_php 

 

You must have added a referenceContainer/referenceBlock and picked name as "tops.link" but the layout is not able to find any block/container with this name.

Please check the layout.xml where you have added this.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

Hi @Ashish_k_php 

This is basically a permission issue. You need to be logged in as full previledged user or a su user in your server terminal. Run this in your magento 2.x installation root:

chown -R [apache-user:apache-group] .; && find . -type f -exec chmod 664 {} \; && find . -type d -exec chmod 775 {} \;/usr/bin/php bin/magento setup:static-content:deploy;
/usr/bin/php bin/magento cache:flush;

It may help  you to resolve issue.

Problem Solved ? Click on 'Kudos' & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the

Hi @Bhanu Periwal 

We give the permission as per let you know in the post but not resolve issue and still display in error_log.

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

Hi @gaurav_harsh1,

Can you please explain more about this and if possible give an example link or reference so, get perfect ideas.

Because already mention top.link.

Please share more ideas or example which can help to easy resolve the issue.

Thanks you.

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

@Ashish_k_php 

 

I am not sure the issue occurring is because of that, if still that is the issue, do the following steps :

  1. Open terminal in your project folder.
  2. run below command :
    grep -r "top.links"
  3. There must be some files (layout.xml/default.xml) in your custom module which have this piece of code.
  4. If it is present in any file(s), remove that element for once and then run below command :
    chmod -R 0777 var/ generated/ pub/static/
    php bin/magento setup/upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f     // use -f if you are doing on local
    php bin/magento c:f
  5. If after all these commands your site works, then the issue is with the layout file from where you removed that code.

 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

Hi, @gaurav_harsh1 

We did the same and but not resolve the issue.

We checked and not any of the custom modules have a piece of code.

Then after we run all the command which you mention here in your post and that all the command works fine without any error.

After that, we can check and error display the same in error_log.

Thanks for your reply.

Please share if you have any other ideas for the same.

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

then I don't think this issue is related with the error shown because that seems a basic warning, can you please do the same process of importing CSV with network tab open to record all the Network data transfer.

You might get error in console or in network tab regarding that.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

@gaurav_harsh1 

We checked in the browser and get the error like:

validation.min.js:6 POST website-domain/admin/import/validate/key/a9d5888b32f28f290077d6b3a33d056923daacbe561ba22259092b3a71d280f4/?form_key=d3AWuJSCeMTITK1S 500 (Internal Server Error)


We already did the mention above all the command and works fine.

Then after did the proper file and folder permission.

But still not resolve this issue.

Can you please check and let us know if any ideas.


Re: Broken reference: The element with the "top.links" ID wasn't found. Verify the ID and

@Ashish_k_php 

 

There must be some error shown for this API request, check in response/preview, or just click on the file name to get the error.

 

PS : Make sure your environment is in developer mode.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy