Answers.Body: <p>I think this may have something to do with the <a href="https://en.wikipedia.org/wiki/Fragment_identifier">fragment identifier</a> (#).  This is typically used to link to a particular point within a page (an anchor).  However, in this case I think it is being used by the JavaScript framework to indicate a particular page view.  I guess that Drupal may not be able to process URLs like this.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T13:33:51.220Z
Answers.Text: hey @William - have you had a chance to reproduce this? As the CiviCRM project is transitioning to AngularJS for all forms - we may need to rethink the # in its urls
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T14:34:52.060Z
Answers.Text: @KarinG-SemperIT I haven't looked into this myself but it would be worth checking it out.  Perhaps best to avoid the # if possible?
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T17:26:16.307Z
Answers.Text: I think you're correct - voted you up! And added a possible immediate workaround for Peter.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T10:31:45.010Z
Answers.LastActivityDate: 2016-04-18T10:31:45.010Z
Answers.UserDisplayName: William Mortada
Answers.Body: <p>I think @William is correct - I just tried and I can't get a Block -> Visibility -> Pages -> Show block on specific pages -> Only the listed pages -> to show up on a #a URL (tried escaping the # - can't do it). civicrm/a* works - but then you'd be seeing it on all forms using AngularJS.</p>
  
  <p>That's not good! Let's search JIRA CiviCRM for it - and if needed report it. I did have a client run into using #a on iOS/Safari - workaround at that time for to use Chrome - but this is a bigger issue.</p>
  
  <p>Possible immediate workaround [I know not ideal]
  I suspect that you only have few people who can CiviMail -> put them into a Drupal Role of their own -> then:</p>
  
  <ul>
  <li>use Region settings to only show this block to your staff in the
  CiviCRM theme</li>
  <li>use visibility settings -> Roles -> Show block for specific roles</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T17:20:21.917Z
Answers.LastActivityDate: 2016-05-18T17:20:21.917Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>Agree with Williams' description.</p>
  
  <p>Other possible resolutions:</p>
  
  <ol>
  <li>Give some love and patience to planned updates for the form system. Right now, Angular pages are strictly SPA ("single-page architecture" -- "javascript handles the page routing") and they're not very hookable. Current plans for the next iteration provide more hookability and reduce the reliance on SPA. (Somewhat related: <a href="https://forum.civicrm.org/index.php?topic=36978.0" rel="nofollow">https://forum.civicrm.org/index.php?topic=36978.0</a> )</li>
  <li>Target the block at the base page <code>civicrm/a</code>. In the code for your block, use some Javascript to call <code>setInterval()</code> and periodically check <code>window.location.hash</code>; hide or display the desired block with <code>$.hide()</code> or <code>$.show()</code>.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T23:06:53.520Z
Answers.Text: Increase hookability for AngularJS forms: cool; yes I would love that! Ad 2: many Drupal blocks are not generated in code though - we must retain some way for Drupal blocks to be displayed via the Drupal Core -> structure -> blocks GUI - esp if we get to building public Contribution pages with AngularJS - b/c there you'd typically get all sorts of Drupal blocks added to such a CiviCRM page: like eg social media block; search block etc
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T14:25:41.310Z
Answers.Text: Idle curiosity - any reason that the existing architecture of angular pages didn't include different urls? Would it be super difficult to just add in an extra path component after the /civicrm/a/ that is ignored by the angular code?
Answers.UserDisplayName: Alan Dixon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T21:55:32.130Z
Answers.Text: That might work for some use-cases. FWIW, though, it would only display Drupal blocks that match the *original* path; when you navigate among different Angular routes (e.g. `civicrm/a/#/abtest` => `civicrm/a/#/abtest/new` => `civicrm/a/#/abtest/1`), that navigation is all client-side, so it would never ask Drupal to rerender the list of blocks.
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-18T21:25:43.273Z
Answers.LastActivityDate: 2016-05-18T21:25:43.273Z
Answers.UserDisplayName: Tim Otten
Answers.Body: <p>Taking this in a slightly different direction - it reminds me that in general, CiviCRM urls are not very nice when it comes to Drupal, because Drupal doesn't like to pay attention to query strings. I wonder if there is a broader solution that also deals with this issue? I'd imagined that there's a simple Drupal hook that could so some rewriting in and out.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T14:22:33.543Z
Answers.LastActivityDate: 2016-05-19T14:22:33.543Z
Answers.UserDisplayName: Alan Dixon
Answers.Body: <p>I haven't tried this so don't know if it will work. But, I create URL aliases for my civicrm contribution pages so that when a user goes to those pages it's a nice pretty url instead of the long civicrm url. I wonder if creating a URL alias in Drupal and then using that alias as the URL for the Show only on this page would work?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T19:09:42.297Z
Answers.Text: Unfortunately, that will not work - for the same reason (the # in the URL). Also for a new mailing screen - you can't URL alias that as unlike stationary contribution page URLs the id is generated as you create the new mailing: civicrm/a#/mailing/776 and then civicrm/a#/mailing/777 etc.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T21:56:11.237Z
Answers.Text: I didnt think about the id's changing. blah.
Answers.UserDisplayName: frTommy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-19T18:29:12.003Z
Answers.LastActivityDate: 2016-05-19T18:29:12.003Z
Answers.UserDisplayName: frTommy
Body: <p>I want to add some inline help to the New mailing CiviMail.  e.g. show a block on this page civicrm/a/#/mailing/12345</p>
  
  <p>I've created my drupal block, set it to appear in the correct theme and set it to only display on this page: civicrm/a/#/mailing/*</p>
  
  <p>However for some reason it won't show.  I've backtracked and I'm able to get it to show up with this expression: civicrm/* but as soon as I add civicrm/a/* it doesn't work, just doesn't display</p>
  
  <p>Any ideas about why this might be?</p>
  
  <p>Thanks
  Peter</p>
  
Tags: <civimail><drupal>
Title: Drupal block not appearing on CiviMail page
ThreadText: # Drupal block not appearing on CiviMail page
  
  (Asked by: username_0 on 2016-04-18)
  
  I want to add some inline help to the New mailing CiviMail. e.g. show a block on this page civicrm/a/#/mailing/12345
  
  I've created my drupal block, set it to appear in the correct theme and set it to only display on this page: civicrm/a/#/mailing/\*
  
  However for some reason it won't show. I've backtracked and I'm able to get it to show up with this expression: civicrm/\* but as soon as I add civicrm/a/\* it doesn't work, just doesn't display
  
  Any ideas about why this might be?
  
  Thanks
  username_0
  
  **Tags:** civimail, drupal
  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_1 on 2016-04-18. Score: 5
  
  I think this may have something to do with the [fragment identifier](https://en.wikipedia.org/wiki/Fragment_identifier) (#). This is typically used to link to a particular point within a page (an anchor). However, in this case I think it is being used by the JavaScript framework to indicate a particular page view. I guess that Drupal may not be able to process URLs like this.
  
  > **Comments:**
  > **username_2**: hey @username_1 - have you had a chance to reproduce this? As the CiviCRM project is transitioning to AngularJS for all forms - we may need to rethink the # in its urls  
  > **username_1**: @username_2 I haven't looked into this myself but it would be worth checking it out.  Perhaps best to avoid the # if possible?  
  > **username_2**: I think you're correct - voted you up! And added a possible immediate workaround for username_0.  
  
  ---
  
  ### Answer by username_2 on 2016-05-18. Score: 4
  
  I think @username_1 is correct - I just tried and I can't get a Block -> Visibility -> Pages -> Show block on specific pages -> Only the listed pages -> to show up on a #a URL (tried escaping the # - can't do it). civicrm/a\* works - but then you'd be seeing it on all forms using AngularJS.
  
  That's not good! Let's search JIRA CiviCRM for it - and if needed report it. I did have a client run into using #a on iOS/Safari - workaround at that time for to use Chrome - but this is a bigger issue.
  
  Possible immediate workaround [I know not ideal]
  I suspect that you only have few people who can CiviMail -> put them into a Drupal Role of their own -> then:
  
  * use Region settings to only show this block to your staff in the
    CiviCRM theme
  * use visibility settings -> Roles -> Show block for specific roles
  
  
  ---
  
  ### Answer by username_3 on 2016-05-18. Score: 3
  
  Agree with Williams' description.
  
  Other possible resolutions:
  
  1. Give some love and patience to planned updates for the form system. Right now, Angular pages are strictly SPA ("single-page architecture" -- "javascript handles the page routing") and they're not very hookable. Current plans for the next iteration provide more hookability and reduce the reliance on SPA. (Somewhat related: <https://forum.civicrm.org/index.php?topic=36978.0> )
  2. Target the block at the base page `civicrm/a`. In the code for your block, use some Javascript to call `setInterval()` and periodically check `window.location.hash`; hide or display the desired block with `$.hide()` or `$.show()`.
  
  > **Comments:**
  > **username_2**: Increase hookability for AngularJS forms: cool; yes I would love that! Ad 2: many Drupal blocks are not generated in code though - we must retain some way for Drupal blocks to be displayed via the Drupal Core -> structure -> blocks GUI - esp if we get to building public Contribution pages with AngularJS - b/c there you'd typically get all sorts of Drupal blocks added to such a CiviCRM page: like eg social media block; search block etc  
  > **username_4**: Idle curiosity - any reason that the existing architecture of angular pages didn't include different urls? Would it be super difficult to just add in an extra path component after the /civicrm/a/ that is ignored by the angular code?  
  > **username_3**: That might work for some use-cases. FWIW, though, it would only display Drupal blocks that match the *original* path; when you navigate among different Angular routes (e.g. `civicrm/a/#/abtest` => `civicrm/a/#/abtest/new` => `civicrm/a/#/abtest/1`), that navigation is all client-side, so it would never ask Drupal to rerender the list of blocks.  
  
  ---
  
  ### Answer by username_4 on 2016-05-19. Score: 1
  
  Taking this in a slightly different direction - it reminds me that in general, CiviCRM urls are not very nice when it comes to Drupal, because Drupal doesn't like to pay attention to query strings. I wonder if there is a broader solution that also deals with this issue? I'd imagined that there's a simple Drupal hook that could so some rewriting in and out.
  
  
  ---
  
  ### Answer by username_5 on 2016-05-19. Score: 0
  
  I haven't tried this so don't know if it will work. But, I create URL aliases for my civicrm contribution pages so that when a user goes to those pages it's a nice pretty url instead of the long civicrm url. I wonder if creating a URL alias in Drupal and then using that alias as the URL for the Show only on this page would work?
  
  > **Comments:**
  > **username_2**: Unfortunately, that will not work - for the same reason (the # in the URL). Also for a new mailing screen - you can't URL alias that as unlike stationary contribution page URLs the id is generated as you create the new mailing: civicrm/a#/mailing/776 and then civicrm/a#/mailing/777 etc.  
  > **username_5**: I didnt think about the id's changing. blah.  
  
  ---
  
  