fbpx
Welcome, Guest
Username: Password: Remember me

TOPIC: (SOLVED) Multiple admin links

Multiple admin links 1 week 1 day ago #28182

  • thirdsun
  • thirdsun's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
The shortcut for JDBuilder Pro shows twice on my admin menu. Could be because I have a custom admin menu, but I can't figure out how to get rid of it, and never had this happen with other components that have their own menu item. I would rather didn't show at all, then twice - an option to disable? Thanks
Attachments:
The topic has been locked.

Multiple admin links 1 week 11 hours ago #28209

  • nishtha
  • nishtha's Avatar
  • Offline
  • Moderator
  • Posts: 2167
  • Thank you received: 190
  • Karma: 29
Hi,

Please follow the steps as mentioned below:

#1 Go to your site's folder directory: SITE_ROOT/plugins/system/jdbuilder/ and open the jdbuilder.php file.

#2 Replace the code on line no 595 in the file, with the one mentioned below:-
$body = preg_replace(‘/’ . preg_quote(‘<ul id=“nav-empty”‘, ‘/’) . ‘/’, $adminMenu . ‘<ul id=“nav-empty”’, $body, 1);

And this should fix it. Confirm and let us know the results after which we can release a JD Builder update for the same.

Thanks,
Nishtha
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.

To know more about products check out the their documentation.
Last Edit: 1 week 11 hours ago by nishtha.
The topic has been locked.

Multiple admin links 1 week 9 hours ago #28220

  • thirdsun
  • thirdsun's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
Thanks.

When I put in that code, I got this error:
0 syntax error, unexpected 'id' (T_STRING), expecting ')'

Then, I changed to:
$body = preg_replace('/' . preg_quote('<ul id=“nav-empty”', '/') . '/', $adminMenu . '<ul id=“nav-empty”', $body, 1);

Note the [ ' ] instead of [ ’ ] throughout

No error then, but now there is no menu at all.
The topic has been locked.

Multiple admin links 4 days 18 hours ago #28249

  • nishtha
  • nishtha's Avatar
  • Offline
  • Moderator
  • Posts: 2167
  • Thank you received: 190
  • Karma: 29
HI,

Did you clear the cache and then checked? Because I updated the same on my step up and did not face any such issue.

You have to replace this code:
$body = str_replace(‘<ul id=“nav-empty”‘, $adminMenu . ‘<ul id=“nav-empty”‘, $body);

with this:
$body = preg_replace(‘/’ . preg_quote(‘<ul id=“nav-empty”‘, ‘/’) . ‘/’, $adminMenu . ‘<ul id=“nav-empty”’, $body, 1);

And please share a screenshot of what you now see.

Thanks,
Nishtha
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.

To know more about products check out the their documentation.
The topic has been locked.

Multiple admin links 4 days 9 hours ago #28270

  • thirdsun
  • thirdsun's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
If I replace with the code you have:

$body = preg_replace(‘/’ . preg_quote(‘<ul id=“nav-empty”‘, ‘/’) . ‘/’, $adminMenu . ‘<ul id=“nav-empty”’, $body, 1);

I get error on first screenshot.

If I use this:

$body = preg_replace('/' . preg_quote('<ul id=“nav-empty”', '/') . '/', $adminMenu . '<ul id=“nav-empty”', $body, 1);

I get no error, but no menu either. (second screenshot)

Note the undirected single quote
Attachments:
The topic has been locked.

Multiple admin links 3 days 18 hours ago #28312

  • hitesh99raj
  • hitesh99raj's Avatar
  • Offline
  • Administrator
  • Posts: 67
  • Thank you received: 22
  • Karma: 4
Hi,
Please try copying the code from here. gist.github.com/hiteshaggarwal/9332718b2cca5e57d940b5b8b66b5d63

Thanks,
Hitesh
The topic has been locked.

Multiple admin links 3 days 2 hours ago #28342

  • thirdsun
  • thirdsun's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
Great thanks, OK, that is working.
The topic has been locked.

Multiple admin links 2 days 18 hours ago #28349

  • nishtha
  • nishtha's Avatar
  • Offline
  • Moderator
  • Posts: 2167
  • Thank you received: 190
  • Karma: 29
Perfect! the problem looks solved in that case, topic shall be closed.
Do let us know for more.

Thanks,
Nishtha
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.

To know more about products check out the their documentation.
Last Edit: 2 days 18 hours ago by nishtha.
The topic has been locked.
Moderators: chandandeep
Time to create page: 0.430 seconds
Cron Job Starts