Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In D7 the chart_copy() method does not work correctly. It seems it has not been rewritten to accomodate for the change in the file system (and some methods does not exist in Drupal 7).
Comment | File | Size | Author |
---|---|---|---|
#13 | chart-copy-issue-1303706-comment-13.patch | 2.06 KB | lsolesen |
#11 | chart-copy-issue-1303706-comment-11.patch | 2.2 KB | lsolesen |
#2 | chart-copy-issue-1303706.patch | 2.07 KB | lsolesen |
Comments
Comment #1
lsolesen CreditAttribution: lsolesen commentedGives a fatal error because a D6 function is called twice in the function.
Comment #2
lsolesen CreditAttribution: lsolesen commentedAttached path that fixes chart_copy and upgrades the function to D7.
Comment #3
13rac1 CreditAttribution: 13rac1 commentedThe code for chart_copy() looks good.
I cannot apply the code change to chart_url() since it will cause problems for non-HTTPS sites. Is there an issue with that code?
Comment #4
lsolesen CreditAttribution: lsolesen commented@eosrei Originally the code was set to https:in earlier version of chart
The current code will not result in a valid link, as no protocol i stated. At the moment only Google is implemented, and they serve as https? That is the reason I added https in front of $uri. chart_copy will not work otherwise.
Comment #5
13rac1 CreditAttribution: 13rac1 commentedIf that is the case, it is a separate problem and should have a separate issue. Both HTTP and HTTPS work with Google Image Charts:
Comment #6
lsolesen CreditAttribution: lsolesen commentedYeah I know Google serves both ways. Maybe the protocol should be a setting in the module then? If you think that is a better approach, I can create a new issue and make a patch for that!
Comment #7
13rac1 CreditAttribution: 13rac1 commentedCan you show me an example where url('//'); doesn't work? I've had no problem with it.
Comment #8
lsolesen CreditAttribution: lsolesen commentedfile_get_contents
Comment #9
13rac1 CreditAttribution: 13rac1 commentedAh... Only there. Interesting it doesn't affect anything else. The ideal method to correct this is to detect what the current page is loading as and adjust the protocol accordingly.
Comment #10
lsolesen CreditAttribution: lsolesen commentedOk. I will try to change the patch. Working on it now.
Comment #11
lsolesen CreditAttribution: lsolesen commentedAttached patch where the protocol is guessed from $_SERVER['HTTPS']
Comment #12
13rac1 CreditAttribution: 13rac1 commentedPlease review this previous issue regarding HTTPS vs HTTP for chart: #587742: Use protocol relative Google Chart API URL. The code requires an isset() at the minimum.
Comment #13
lsolesen CreditAttribution: lsolesen commentedAdded new patch where the protocol is added in chart_copy instead.
Comment #14
lsolesen CreditAttribution: lsolesen commentedComment #15
13rac1 CreditAttribution: 13rac1 commentedI fixed the whitespace errors and committed.
Comment #17
Pierre.Vriens CreditAttribution: Pierre.Vriens commented