Closed (fixed)
Project:
Doubleclick for Publishers (DFP)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2014 at 19:22 UTC
Updated:
31 Aug 2023 at 07:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
elephant.jim commentedThere are a couple of things going on.
For starters, I was misunderstanding the module configuration instructions when I said that
<none>would show up. For the default slug, if you want no slug, you should leave the field blank. OTOH, for a particular slot,<none>is necessary for an empty slug. Perhaps the instructions for the default slug can be amended to read, "Slug all ad tags with this label. Leave blank for no slug."But then there's a related bug. dfp_format_slug() gets called twice for ads in blocks: once by dfp_tag() and once by template_preprocess_dfp_tag(). S'pose my default slug is "Advertisement", but the ad slot says to have none. When dfp_tag() runs, the slug is set to the empty string. However, then template_preprocess_dfp_tag() sees the empty string and sets the slug to the default slug.
Should dfp_format_slug() be called by dfp_tag()?
Comment #2
jesse.d commentedI just ran into this same issue. I guess it's still around. As mentioned in #1, dfp_format_slug is called twice. Once in dfp_tag and once in template_preprocess_dfp_tag(). The attached patch removes the call to dfp_format_slug() in dfp_tag, allowing the template preprocess to handle the display of the slug. This fixes the problem that I was having of not having an effect on an ad slug if there is a default ad slug set.
Comment #4
jesse.d commentedUpdating issue summary
Comment #5
Rossh commentedI'm attempting to solve the issues with the above patch which has now expired. The solution works for me at a local level, but I'd like a formal patch for it here for further projects
Comment #6
tariqinam commentedComment #7
tariqinam commentedComment #8
tariqinam commentedRemoving the dfp_format_slug() from template_preprocessor as it tries to reset already generated slug in dfp_tag(). which ultimately causing this issue.
Comment #9
tariqinam commentedComment #10
guardiola86 commentedI've just tested the last patch and it works well.
Comment #12
vladimirausThank you for contribution. 🍻
Committed!
Comment #13
vladimiraus