duanniling0018 2015-02-03 16:02
浏览 46
已采纳

Drupal 7重写是从查询字符串中删除get参数

I've recently upgraded a site to the latest release of Drupal 7. The site has a view that retrieves a url with query string parameters from the database and then uses the Drupal rewrite functionality to add a class to the link like so: <a class="purple-button pull-right" href="[field_database_link-url]" target="_blank">View</a>

The issue is, since the upgrade the rewrite now removes the query string parameters. If I modify the view to display a simple link the parameters are there and it works fine. However, the rewrite applies styling to present a button rather than a simple link. I can't find any settings to resolve the issue so I suspect the upgrade overwrote a modification to the Drupal core made by the original developer of the site. Any idea how I can address this issue?

  • 写回答

1条回答 默认 最新

  • douchuoliu4422 2015-02-19 04:07
    关注

    It turns out that there was a bug in the latest release that in /modules/contrib/link/link.module that was causing the query strings to be stripped from the url in the token. I replaced the code in this file with the code from the pre-upgrade version and it began behaving as expected again. This, of course, is not a resolution to the issue, but at least the source of the problem has been identified. For more info: https://www.drupal.org/node/2367069

    I later found that there is a patch for this issue in the dev version (7.x-1.x-dev) of this module available here: https://www.drupal.org/project/link. Download this module and replace it in your install and you should be all set.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?