Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon is not working in Blade templates #144

Open
FlorianMoser opened this issue Aug 9, 2022 · 16 comments
Open

Addon is not working in Blade templates #144

FlorianMoser opened this issue Aug 9, 2022 · 16 comments
Labels
bug Something isn't working

Comments

@FlorianMoser
Copy link

When using Blade templates and inserting SEO tags using {!! Statamic::tag('aardvark-seo:head') !!}, the tags are added to the HTML, but the fields are not populated (meta-description and other meta values are empty).

@rich-williamson
Copy link

rich-williamson commented Oct 10, 2022

+1 to this issue. I can go further and say several of the tags aren't even present let alone populated. I have all the fields filled in the UI and this is the output.

<title></title>
<link rel="canonical" href="">
<meta property="og:url" content="">
<meta property="og:site_name" content="">
<meta property="og:title" content="  ">
<meta property="og:description" content="">
<meta property="og:type" ontent="website">
<meta property="og:locale" content="en-US">
<meta name="twitter:card" content="summary">

@AndrewHaine AndrewHaine added the bug Something isn't working label Oct 10, 2022
@AndrewHaine
Copy link
Contributor

Looking into this I believe this may be caused by the way we're fetching the data for the tag, this will be changing significantly in 2.1 so we'll revisit this issue after we've implemented the changes required for #137

@maxi032
Copy link

maxi032 commented Nov 10, 2022

I also have this problem. Any news on when it could be fixed?

@mojosef
Copy link

mojosef commented Dec 7, 2022

@maxi032 I'm including an antlers template that contains the antlers tag for now. Not ideal but works until there is a fix.

@include('seo.head')

-- seo/head.antlers.html

{{ aardvark-seo:head }}

I'm not using the body and footer tags but same process.

@wireblue
Copy link

wireblue commented Mar 3, 2023

I'm still not quite sure how or why, but switching to the new Antlers version of "runtime" (in config/statamic/antlers.php) seems to have fixed it for us.

We're still using {!! Statamic::tag('aardvark-seo:head') !!} in our blade files (no blade @includes()).

@geertjanknapen1
Copy link

This still seems to be happening. Antlers is on runtime, tried both using Statamic::tag('aardvark-seo:head') and including an .antlers.html file that contains {{ aardvark-seo:head }}.

Am I doing something wrong?
When will this be fixed? Issue is quite old and I don't want to be paying for an addon that does not do what it should.

@CandourDevs
Copy link
Contributor

Hi @geertjanknapen1

Thanks for your message. We'll be addressing the current list of open bugs in July - this is on top of the list, so will be addressed within the month. We'll post an update as soon as this is ironed out.

@geertjanknapen1
Copy link

@CandourDevs And there's no workaround? The project I am working on is supposed to go live on the first of July, no SEO is a major showstopper.

@geertjanknapen1
Copy link

I did some digging. Seems that it's not an issue with the tags or anything, but with the way data is retrieved. At least that is the case for my project, which is highly customized.

As an example. PageDataParser::generatePageTitle() checks the data variable for a meta_title by doing $data->get('meta_title'). However, for me that will never work since it should be checking the entry which is a product in this case, if I'd change it to $data['product']->meta_title it works, but then it would only work for product entries, which is ofcourse not the case.

Could this be because we also use statamic/eloquent-driver to save entries in the database, and have a custom wrapper for entries?

The story basically boils down to one question;
Is aardvark-seo compatible with the statamic/eloquent-driver or should I look for other options?

@CandourDevs
Copy link
Contributor

@CandourDevs And there's no workaround? The project I am working on is supposed to go live on the first of July, no SEO is a major showstopper.

Hi @geertjanknapen1 apologies that we're unable to address this issue before the go-live date for your project. Considering this blocker, please let me know if you have downloaded a paid version of the addon and I can arrange a full refund for you.

@geertjanknapen1
Copy link

geertjanknapen1 commented Jun 29, 2023

@CandourDevs No need to apologize, the deadline isn't yours to meet. I'm also sure you guys are just as busy as me and trying your best to address the issues. What is important to me though is whether the addon is compatible with the statamic/eloquent-driver package.

I think I will be coming up with a custom workaround until you guys have been able to address the issues, but if we later find out that the problem is not the issues but compatibility with the eloquent-driver package, then I'd rather not spend time on a workaround.

So, is aardvark-seo compatible with the statamic/eloquent-driver or should I look for other options?

@CandourDevs
Copy link
Contributor

Hi @geertjanknapen1 thanks for your response - at the moment, the addon is not compatible with statamic/eloquent-driver but this is a function we're looking to bring into the addon as part of the new roadmap for the addon.

@geertjanknapen1
Copy link

@CandourDevs Right, thank you very much! I look forward to the development of the plugin, for now, I will be building something custom.

@semvgelooven
Copy link

@CandourDevs any update on this issue?

@CandourDevs
Copy link
Contributor

Hi @semvgelooven

This is currently a work in progress within the dev team, we're hoping to have this ironed out shortly.

We'll send you an update once this is fixed.

@CandourDevs
Copy link
Contributor

Hi. Apologies for the delay. We’re having trouble recreating the problem. If this is still an issue, can we get details of the minimum requirements to recreate, as well as further specifics about what is missing from the SEO fields? We tried making a blade template and using {!! Statamic::tag('aardvark-seo:head') !!}, and the fields seem to be populating correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants