sfBreadcrumbPlugin don't display links

Discussion relating to version 1.2.x stable

sfBreadcrumbPlugin don't display links

Postby gaspar » Sun Sep 13, 2009 3:07 am

Hello all,

I installed sfBreadcrumbPlugin like the readme is in http://www.symfony-project.org/plugins/sfBreadcrumbPlugin.

I'm using symfony 1.2.7. And I placed
Code: Select all
breadcrumb: ~
in my fontend/config/filters.yml;
I also create the file breadcrumb.yml in frontend/modules/home/config and placed the following code
Code: Select all
index:
  link: Home

I typed the code
Code: Select all
<?php echo sfBreadcrumb::render(); ?>
in my layout.php (frontend application). But there isn't any link in my home :(~ :-(~ :sad: . What did I do wrong?

Thanks
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby robert » Sun Sep 20, 2009 11:15 pm

Hi,
Please try the following troubleshooting steps and let me know the outcome:

- Ensure the plugin is enabled in /config/ ProjectConfiguration.class.php.
Code: Select all
$this->enablePlugins(array(..., 'sfBreadcrumbPlugin'));


1. clear the symfony cache
2. Navigate to a module/action which has a breadcrumb.yml in your browser.
3. ]Look for a file in /cache/$app/$env/config/modules_$mdoule_config_breadcrumb.ym l

If it is there it should look something like:
Code: Select all
$action = sfContext::getInstance()->getActionName();
if($action == 'index') { sfBreadcrumb::getInstance()->registerLocation($LINK_TEXT); }


If it is not there then the filter is not being registered properly or there is another problem. Are there any other files there?

1. Open up plugins/sfBreadcrumbPlugin/lib/sfBreadcrumbFilter.class.php and put die('here'); in the execute() action.
- Page dies?
1. Move it to the if(), pages does not die? The breadcrumb.yml file is not being found.
robert
Junior Member
 
Posts: 1
Joined: Sat Nov 11, 2006 10:59 am

Re: sfBreadcrumbPlugin don't display links (SOLVED)

Postby gaspar » Mon Sep 21, 2009 6:32 am

I tried all you suggest Robert unfortunally it is not working here. I'm very thankfull for all your help emailed me!

I solved my problem using a plugin called isicsBreadcrumbsPlugin. The link is here http://www.symfony-project.org/plugins/isicsBreadcrumbsPlugi n.

Thank you
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby srozie » Fri Nov 20, 2009 2:08 am

Hello,

I tried using this isicsBreadcrumbsPlugin. But it's not working for me, I did the step in the link which you had posted, but it should these error:

Undefined variable: breadcrumbs .... [in the template.php which I have used it]

and

Fatal error: Call to a member function addItem() on a non-object in.....

so can you please tell me what should I do to make this working??

thanks.
regards
srozie
Junior Member
 
Posts: 25
Joined: Sun Jul 26, 2009 5:57 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Fri Nov 20, 2009 3:02 am

Hello srozie,

1 - You installed the plugin isicsBreadcrumbsPlugin, then you run the
Code: Select all
symfony cc
after that you should run the command
Code: Select all
symfony plugin:publish-assets
See if the plugin is listed. If it isn't in plugin list in terminal. Please, open the file ProjectConfirguratin.class.php e and see if this plugin is enabled.

2 - Open the file layout.php in appName/templates/layout.php, put
Code: Select all
    <p id="breadcrumbs"> 
      <?php include_component('isicsBreadcrumbs', 'show') ?>
     </p>


3 - Open the file action.class.php in appName/modules/moduleName/actions/actions.class.php and put
Code: Select all
public function executeActionName()
{
isicsBreadcrumbs::getInstance()->addItem('Name of Link', 'moduleName/ActionName');
 
 ...

}


4 - I don't think it will to work in templateSuccess.php but really worked in layout.php

This steps worked good for me here.

Hugs
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby srozie » Fri Nov 20, 2009 10:53 pm

Hello Gaspar,
Thanks a lot for your kind reply.

But I had already tried so, but still it shows this error the undefined one. Yes the plugin is listed there. I also have tried the other plugin the sfBreadcrumbPlugin. That is also enabled, but not working either......

only the HOME link is appeared but nothing else.

it says: undefined variable breadcrumb in TemplateSuccess.php
and call to a member function addItem() on a non-object......


Don't know what to do next. :(~ :-(~:sad :(
srozie
Junior Member
 
Posts: 25
Joined: Sun Jul 26, 2009 5:57 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Sat Nov 21, 2009 5:24 pm

Dear srozie ,

Something is wrong in your code I think. For example if you are using isicsBreadcrumbsPlugin why this error is showing in your TemplateSuccess.php? Like I said, only actions.class.php and layout.php are files editables using the plugin, nothing more.

Please, look all your documents because there isn't a variable called breadcrumb. This plugin works with $isicsBreadcrumbs variable. Check out your code!

For more ... post your code here! We can help you better.

Hugs
Last edited by gaspar on Sat Nov 21, 2009 5:30 pm, edited 1 time in total.
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby srozie » Sat Nov 21, 2009 5:44 pm

Hi,
thanks a lot for considering my problem,

well I went through the steps written in readme file, so it's said there to write this code in the templates:

<?php $breadcrumbs->addItem('My action', 'myModule/myAction') ?>

so the variable is $breadcrumbs and not $isicsBreadcrumbs

I changed the variable to what you said but still the same error,

-----
my action:
public function executeBestarticles(sfWebRequest $request)
{
isicsBreadcrumbs::getInstance()->addItem('Best Articles', 'int_home/bestarticles');

-----
in the template:
<?php $isicsBreadcrumbs->addItem('Best Articles', 'int_home/bestarticles') ?>

------
in the layout.php
<p id="breadcrumbs">
You are here :
<?php include_component('isicsBreadcrumbs', 'show') ?>
</p>

----------------

so have I done anything wrong??
thanks
srozie
Junior Member
 
Posts: 25
Joined: Sun Jul 26, 2009 5:57 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Sat Nov 21, 2009 6:09 pm

Please ... there isn't nothing in template. Do not put nothing in template. just do that
_________
my action:
public function executeBestarticles(sfWebRequest $request)
{
isicsBreadcrumbs::getInstance()->addItem('Best Articles', 'int_home/bestarticles');

________________
in the layout.php
<p id="breadcrumbs">
You are here :
<?php include_component('isicsBreadcrumbs', 'show') ?>
</p>


hugs
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby srozie » Sat Nov 21, 2009 6:13 pm

YESSS thank you so much it's working now!!! :)~ :-)~:smile :) Thanks!
srozie
Junior Member
 
Posts: 25
Joined: Sun Jul 26, 2009 5:57 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Sat Nov 21, 2009 6:18 pm

You're welcome

Hugs from Brazil
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby srozie » Sat Nov 21, 2009 8:47 pm

Hi Gaspar again,

I want to apply css on the links which are created by breadcrumb, but can't the css is not working especially on the home link, have you applied that?? can you please tell me how to do it?? or how to replace the home link with a home icon??

thanks
srozie
Junior Member
 
Posts: 25
Joined: Sun Jul 26, 2009 5:57 pm

Re: sfBreadcrumbPlugin don't display links

Postby Pradeep_sym » Tue Oct 12, 2010 6:44 pm

Hello,

I am not able to activate sfBreadcrumbPlugin or make it work in my symfony application. Can you please provide me the detailed steps involving changes wherever required.

I am working with Symfony 1.2 version. It supports sfBreadcrumbPlugin 1.0.0.

I did several attempts to follow with the steps given in symfony site, but couldnt succeed.

Awaiting for any one's reply badlyyy.

- Pradeep_sym
Pradeep_sym
Junior Member
 
Posts: 3
Joined: Sat Oct 09, 2010 9:05 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Wed Oct 13, 2010 12:48 am

Please look for isicsBreadcrumbsPlugin .. that works fine!
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby Pradeep_sym » Mon Oct 18, 2010 3:46 pm

Hi,

I am trying out isicsBreadcrumbsPlugin, it was working to some extent, still some issues to resolve. But, after restart or shutdown, once we boot again and run the command
"php symfony cc", the plugin is not listed in plugins list and isicsBreadcrumbsPlugin folder is not present in ~/plugins folder.

Can you help me in knowing the reason behind this.


Thanks.
Pradeep_sym
Junior Member
 
Posts: 3
Joined: Sat Oct 09, 2010 9:05 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Mon Oct 18, 2010 5:27 pm

Hi @Pradeep_sym,

I've never seen that!!

Well, let's see then. After $ symfony cc did you see into plugin's folder if ther is a folder named isicsBreadcrumbsPlugin... Try to install that and look into your config/ProjectConfiguration.class.php if there is a plugin list enabled... if has it... look for isicsBreadcrumbsPlugin, After that .. try $ symfony plugin:publish-assets and then $ symfony cc

But it is important to tell you ... check in project plugin's folder if there is a folder named config standealone... very strange to that folder! If there is, please ... download manual plugin and unpack it into project plugin's folder .

Hope those help you!!

Hugs
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil

Re: sfBreadcrumbPlugin don't display links

Postby Pradeep_sym » Tue Oct 19, 2010 5:25 am

hi gasper,

Thanks for the help.

In config/ProjectConfiguration.class.php, code is like this:

public function setup()
{
// for compatibility / remove and enable only the plugins you want
$this->enableAllPluginsExcept(array('sfDoctrinePlugin', 'sfCompat10Plugin'));
}

It means isicsBreadcrumbsPlugin is enabled only right? Assuming that, I published as you said. Then as you said, there is no standalone plugins folder in projects config folder.
What to be done then? How to download manual plugin as instructed by you, I mean what does it contain n where to get it from.
Pradeep_sym
Junior Member
 
Posts: 3
Joined: Sat Oct 09, 2010 9:05 pm

Re: sfBreadcrumbPlugin don't display links

Postby gaspar » Tue Oct 19, 2010 1:03 pm

Hi @Predeep_sym

The manual plugin is here http://plugins.symfony-project.org/get/ ... -0.9.9.tgz.

Please take a time to read the Readme Link in http://www.symfony-project.org/plugins/ ... umbsPlugin I think you will have no preblem.

Important ... I meant in PLUGINS projetct folder... sometimes the plugin do not install as a folder by it's name. On install the plugin extract only the internal stuff to PLUGINS PROJECT FOLDER. Not in CONFIG PROJECT FOLDER, ok?

Your config/ProjectConfiguration.class.php is right!!!

To manual install:
1- download the plugin
2- extract it ( will appear isicsBreadcrumbsPlugin-0.9.9)
3- open the isicsBreadcrumbsPlugin-0.9.9 and copy only isicsBreadcrumbsPlugin folder
4- paste in your PLUGINS PROJECT folder
5- In apps/frontend/config/settings.yml put that
all:
.settings:
enabled_modules: [default, isicsBreadcrumbs]
6- $ symfony cc ( every time you edit any .yml file or neet to symfony load any class you must to clear your project cache ).
7- $ symfony plugin:publish-assets
8- go to the plugin page, click Readme and see how to usage the plugin.

Hope it works

Hugs
gaspar
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 4:26 am
Location: Brazil


Return to symfony 1.2

Who is online

Users browsing this forum: No registered users and 0 guests