• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / Yoast-SEO-for-TYPO3 / 14063512994

25 Mar 2025 03:23PM UTC coverage: 1.275% (-0.001%) from 1.276%
14063512994

push

github

web-flow
Merge pull request #605 from Yoast/bugfix/604-crawler-javascript

[BUGFIX] Added missing translations and supportedLanguages javascript configuration for the Crawler module

0 of 2 new or added lines in 1 file covered. (0.0%)

2 existing lines in 1 file now uncovered.

35 of 2746 relevant lines covered (1.27%)

0.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Classes/Service/Crawler/CrawlerJavascriptConfigService.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace YoastSeoForTypo3\YoastSeo\Service\Crawler;
6

7
use TYPO3\CMS\Backend\Routing\UriBuilder;
8
use YoastSeoForTypo3\YoastSeo\Service\Javascript\JavascriptService;
9
use YoastSeoForTypo3\YoastSeo\Service\Javascript\JsonConfigService;
10
use YoastSeoForTypo3\YoastSeo\Service\LocaleService;
11
use YoastSeoForTypo3\YoastSeo\Utility\PathUtility;
12

13
class CrawlerJavascriptConfigService
14
{
15
    public function __construct(
16
        protected JavascriptService $javascriptService,
17
        protected JsonConfigService $jsonConfigService,
18
        protected UriBuilder $uriBuilder,
19
        protected LocaleService $localeService
UNCOV
20
    ) {}
×
21

22
    public function addJavascriptConfig(): void
23
    {
24
        $this->javascriptService->loadPluginJavascript();
×
25
        $this->jsonConfigService->addConfig([
×
26
            'urls' => [
×
27
                'workerUrl' => PathUtility::getPublicPathToResources() . '/JavaScript/dist/worker.js',
×
28
                'preview' => (string)$this->uriBuilder->buildUriFromRoute('ajax_yoast_preview'),
×
29
                'determinePages' => (string)$this->uriBuilder->buildUriFromRoute('ajax_yoast_crawler_determine_pages'),
×
30
                'indexPages' => (string)$this->uriBuilder->buildUriFromRoute('ajax_yoast_crawler_index_pages'),
×
31
                'prominentWords' => (string)$this->uriBuilder->buildUriFromRoute('ajax_yoast_prominent_words'),
×
32
            ],
×
NEW
33
            'translations' => [$this->localeService->getTranslations()],
×
NEW
34
            'supportedLanguages' => $this->localeService->getSupportedLanguages(),
×
UNCOV
35
        ]);
×
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc