There is an event listing page on my site in which events are listed as expandable panels. I added buttons to each event listing so that instead of having to make a new draft of the page to edit a single event (which takes a considerable amount of time to load), one can click the button and it opens a ckeditor window that contains only the fields related to that single event. The window will have the title of "Event: Items (the single event number)"
The code/markup for the buttons works like this...
<? if (user_is_logged_in()) {?>
<a href="/field-collection/field-events-event-items/<?=render($content['field_event_cta_link_type']['#object']->item_id);?>/Edit</a>
<? } ?>
This works fine in the development server/version of the site. On the live version of the site however, the ckeditor window that pops up from the edit button gets the title "unconnected field collection item". Red flag number one.
Then once I hit the save button after making any field revisions, the ckeditor disappears but the page of the site I am editing over is still darkened, as it is when the ckeditor window is active- but it also displays the title of the site as an anchor link and "Error" underneath it. Red flag number two. On the dev version of the site this would take me a page that only shows the single event panel (as well as the site nav and footer) and a green bar underneath the site navigation stating "The changes have been saved."
So I am confused as to why there is a discrepancy between the two versions of the site when they both should be functionally the same. Any ideas? Thanks!
For link generation please use l() function, documentation: https://api.drupal.org/api/drupal/includes%21common.inc/function/l/7.x
I think the link is not formed correctly, try with l().
If still not working try the patch form here: https://www.drupal.org/node/2070159