RW8 generating wrong URL in social tags?

I know this might have been mentioned before but if I try to use the ‘generate social tags’ function in RW8 I get a 404 not found page - after viewing source code I see the problem - RW8 is generating the wrong URL, so of course it cant be found.
Is there any way to fix this?
Thanks

You have an example(screenshot or URL)? If I understand what you’re talking about I don’t see that.

What version of RapidWeaver are you running?

Hi, the problem is of my own making as my URLs are not the same as my folder/menu structure
e.g https://www.boavistaholidayrentals.com/long_term_rentals/VC137.html is actually
https://www.boavistaholidayrentals.com/Apartments/long_term_rentals/VC137.html
The ‘Apartments’ is the ‘dead page’ in the menu so I omitted it in the folder structure…
BUT RW8 doesn’t know that!! so obviously 404 page not found

Not sure I understand what you are saying.
this page https://www.boavistaholidayrentals.com/long_term_rentals/VC137.html doesn’t have any social tags.

RW should (and does for me) build the address in the <meta property="og:url" and <meta name="twitter:url" for you.

It should be the address website address from the general settings and then the folder and page name.

So if you general settings website address is: https://www.boavistaholidayrentals.com
and the folder name is /long_term_rentals/
and the file name is: VC137.html

Then it will build the meta tag like this:

<meta property="og:url" content="https://www.boavistaholidayrentals.com//long_term_rentals/VC137.html">

I just tried it with those fields and that’s the result.

Hi
The problem is that if I tick - ‘generate social tags’ - it generates a url of https://www.boavistaholidayrentals.com/Apartments/long_term_rentals/VC137.html
what should I do to generate the correct url as my folder structure??
THAT is my problem…

1 Like

As I said above RW will generate the URL’s for the meta tags based on the website address, folder and file name.

I entered the information from the URL you gave and the meta tag is copied and pasted from the RapidWeaver output.

The “apartment” isn’t in the folder name so it’s not in the meta tags

Without screenshots of what you have in general and advanced settings, and the page inspector showing folder name and page name it’s hard to duplicate what might be happening.

What exact version of RW8 are you using?

Hi Doug
I will have a poke around in the source code and all the settings etc.
But the website, folder and file name are exactly as you say…got me a bit flummoxed too!!
Thanks for all the help
W

Hi Doug, have messaged you directly
W

Wendy,

Had a look at the screenshots you messaged me, and you have found an error in RapidWeaver.
@Aaron, @dan, @tpbradley.

It’s easy to reproduce.

Any page who’s folder name begins with a / meaning it starts from the root of the site generates incorrect social media meta tags for the og:url as well as the Twitter URL.

If the page is on the top level (right below the home page) it generates the URL with an extra / between the website address and the pages folder name. That’s not too bad as browsers ignore the extra slash.

The really bad part is if the page is a sub-page. Then the URL is built to include the parent(s) folder name(s) as part of the path. Since the path of the page has been entirely defined in the inspector’s”folder” field, this creates the 404 error.

If the folder name starts with a / then it should be used along with the website address to build the URL, and no other parent folders should be used.

2 Likes

So how do I fix it???

Well, it seems that you have a few options.

  • You can wait for RealMac to release a fix to Rapid Weaver. Don’t know how long this will take and I’d hope it’s something that would be fixed in RW8.
  • You can turn off the social media flag and produce the meta tags yourself and place them into the head section of RapidWeaver’s page inspector. This is the way many of us did it prior to RW8.
    • templates can be found in this article
    • there’s numerous “generators” available like this one Online, just do a search for “social media meta tag generator”.
  • The “empty” page that you created has a folder name of “Apartments”. It’s an actual folder and page although an empty page. You could change this to have no folder name and instead use a / as the folder name and set the file name to apartments.html. That will generate a social media meta tag that would look like this
    <meta property="og:url" content="https://www.boavistaholidayrentals.com////long_term_rentals/VC137.html">.
    You can see that there are the extra /// in the URL, this is an error but browsers don’t care and the page will not give you the 404. Click and see: https://www.boavistaholidayrentals.com////long_term_rentals/VC137.html.
  • You could also have a look at the SEO helper stack from Joe Workman. I don’t have the latest on that one, but I understand it will produce those meta tags for you. I do believe that it will require PHP to work, so all the pages would need to be republished with a PHP filename and you would need to manually delete all the old HTML files.
    .
2 Likes

Thanks a lot…not quite sure how I will approach it, might try the empty folder renaming.
and see what happens or generating my own tags…but either way appreciate all your time and effort to help

1 Like

Good luck with whatever way you choose.

When I do empty dummy pages like that, I don’t do an empty stacks page like that.

The reason is you create an actual empty page and or folder. In your case, https://www.boavistaholidayrentals.com/Apartments/ is a real page on the server. If a user should get there by mistake, all they get is a blank screen. No navigation, no not found message just blank.

It also is probably in your XML sitemap that robots read to navigate through the site.

Anyway, I’d suggest that you use an offsite page for that kind of thing and set the address to #. That will not produce the “empty” files/folder and doesn’t show up in the sitemap. It just creates the navigation elements.

1 Like

Thank you