Component is already defined in page.html

Hello, Everybody

I am working on a project using PG and BS4,

I was told that components won’t work property on BS4 but I needed to save time with the navigation, so I pasted my Main Menu navigation section on other pages to avoid repetitive work.

After the first page where I had to paste, I had to close and re-open Pinegrow, when the project was reloading a Status Report Window Poped up saying:

The following happened during processing:

File Messages
mysite-html\index.html Component mysite.navigation is already defined in Site-html\newpage.html.

I haven’t gone further testing what is going to happen or the behavior of the new “pasted” section, but
before I go through the whole site I want to know if this is good or bad, if it is going to work or not? or if there is a better way to do it.

thanks!

Components will work fine with BS4 - in fact in this tutorial I’m using BS4.

It is a little hard to troubleshoot your error message without a little more info. I’m not sure about your project structure. Are both of those folders (mysite-html & Site-html) part of your project? Under the File “Manage libraries & plugins” are you loading the Site-html project into your mysite-html project? Either way, it looks like you are duplicating the main component Id “mysite.navigation”. You need to make it unique by either eliminating one instance from the project or by changing the id.

Let me know if this helps,
Bob

Hello Robert,

Thanks for the reply, and sorry about not giving more detailed info about my project.
Yes, all the .html files as I was referring to in a generic way they were all from the same project.

I just found the problem. I was previously trying to save the navbar as a reusable component and I already had it in my components library.
So I erased the pasted snipped and added the component that I had previously created and it looks like it is going to work.

I am experimenting with Pinegrow blocks and I am not sure if that is going to work, I still wonder about the functionality of blocks, reusable components, or library snippets (for me all the same) as they say, that they don’t work with Pinegrow and Bootstrap 4xx

I will keep working an see how it turns out.

Thanks again.

I will check the link for the tutorial. :+1: