Project

General

Profile

Task #1841

[3 Subjects] Canonical URL should not be hardcoded

Added by Ram Kordale about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
11/02/2021
Due date:
03/10/2022
% Done:

100%

Estimated time:
2.00 h
Spent time:

Description

Regardless of how we land up on a page, the canonical url should contain "<subjectName>*". Today, it is hardcoded to "python-3*". One exception:for Whirlwind book, please hardcode it to python-3* so that we do not have to make Google crawl all our whirlwind book pages again.

#1

Updated by Ram Kordale about 3 years ago

  • Subject changed from Canonical URL should not be hardcoded to [Beyond Python] Canonical URL should not be hardcoded
#2

Updated by Ram Kordale about 3 years ago

  • Subject changed from [Beyond Python] Canonical URL should not be hardcoded to [3 Subjects] Canonical URL should not be hardcoded
#3

Updated by Ayush Khandelwal about 3 years ago

  • Due date set to 11/09/2021
  • Assignee changed from Ayush Khandelwal to Rishabh Sharma
  • Estimated time set to 2.00 h
#4

Updated by Rishabh Sharma about 3 years ago

  • Status changed from New to In Progress
#5

Updated by Rishabh Sharma about 3 years ago

Approaches tried (did not work)-

1. subscribing to subjectEmitter (emitted by website-search.component.ts) event INSIDE router.event.subscribe (this subscription was already present and settting canonical was working perfect) and then update tag accordingly when event is emitted.

2.without using any subscription or event , setting the canonical inside website-search.component.ts file just after we fetch books.

3.change the code of link service (green tick answer) and tried directive (last answer) of the document https://stackoverflow.com/questions/50737862/how-to-add-canonical-link-in-angular-5

4.tried console.log() statements in ssr commands to know the difference when it is working (previous working code) and when it is not working.

helpful Url- https://github.com/angular/angular/issues/15776

#6

Updated by Rishabh Sharma about 3 years ago

some findings-
while updating canonical link tag using function (lets call it UpdateSubject(fakeSubject:string)) with fake hardcoded subject (so no subscription or event emitter needed) from the website-search.component.ts using link service, I found that if I put updateSubject() inside constructor or ngOninit of website-search.component.ts, it shows effect in view page source, but If I put the same function somewhere else (like after getBooks() or inside getBooks() or inside onSelectBook()), it does not shows effect in view page source, but in inspect element, we can see change.

#7

Updated by Rishabh Sharma about 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
#8

Updated by Rishabh Sharma about 3 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Rishabh Sharma to Ayush Khandelwal
#11

Updated by Ayush Khandelwal over 2 years ago

  • Due date changed from 11/09/2021 to 03/10/2022
  • Status changed from Feedback to Reopened
  • Assignee changed from Ayush Khandelwal to Rishabh Sharma
  • % Done changed from 100 to 50

Canonical url is not present on QA

#12

Updated by Rishabh Sharma over 2 years ago

  • Status changed from Reopened to In Progress
#13

Updated by Rishabh Sharma over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100
#14

Updated by Rishabh Sharma over 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Rishabh Sharma to Ayush Khandelwal
#15

Updated by Ayush Khandelwal about 2 years ago

  • Assignee changed from Ayush Khandelwal to Ram Kordale

Working as expected

#16

Updated by Ram Kordale over 1 year ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF