- Posts: 7
COMMUNITY FORUM
Sidebar toggle K2 2.2 bug report and fix
- Gabe
- Topic Author
- Offline
- New Member
Less
More
14 years 8 months ago #77114
by Gabe
Sidebar toggle K2 2.2 bug report and fix was created by Gabe
Using the frontend editor of K2 2.2, there is a redirect error when using the toggle sidebar button. When you click the button, it will redirect to the frontpage.
In /components/com_k2/views/item/tmpl/form.php:
On line 271, replace
with
In /components/com_k2/views/item/tmpl/form.php:
On line 271, replace
with
Please Log in or Create an account to join the conversation.
- Gabe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
14 years 8 months ago #77115
by Gabe
Replied by Gabe on topic Sidebar toggle K2 2.2 bug report and fix
The forum stripped the codes, so I've attached my php file.
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
14 years 8 months ago #77116
by FeSys
Replied by FeSys on topic Sidebar toggle K2 2.2 bug report and fix
Hi " Gabe " ...
Does not happen with me yet.
Thanks for your Guidance and observation.
Thank you for sharing your file.
Does not happen with me yet.
Thanks for your Guidance and observation.
Thank you for sharing your file.
Please Log in or Create an account to join the conversation.
- piperchick
- Offline
- Premium Member
Less
More
- Posts: 133
14 years 8 months ago #77117
by piperchick
Replied by piperchick on topic Sidebar toggle K2 2.2 bug report and fix
Thanks for the fix, Gabe. I have the 2.2 stable build and am getting a big error when I toggle -- the entire lightbox refreshes and I lose my article. This only happens on one of my sites (one was a clean install, one was an upgrade from 2.1 and the one with problems was an upgrade from 2.2 beta).
There is some magic in the code that you posted that stops it from deleting the article, but it also changes the look of the add new item form. Not a big deal, but what you posted is based on a slightly older version.
Have you had any issues with 2.2 stable?
There is some magic in the code that you posted that stops it from deleting the article, but it also changes the look of the add new item form. Not a big deal, but what you posted is based on a slightly older version.
Have you had any issues with 2.2 stable?
Please Log in or Create an account to join the conversation.
- Gabe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
14 years 8 months ago #77118
by Gabe
Replied by Gabe on topic Sidebar toggle K2 2.2 bug report and fix
I haven't used 2.2 stable yet. But I'm imagining it is the same error. It's a pretty basic error that not everyone will have. This is because some of us set the base document to our home page or the current URL, and some of us don't.
I'm attaching a new form.php file for 2.2 stable.
The error is pretty basic. On line 274, the href value is #. Setting a link to point to # is always a bad idea for javascript. The href value should be javascript: void(0);
This is because some people set a base document in their template or through SEO components. If the base document is set to the sites root domain, then a link pointing to # will go to site.com/#
piperchick said:Thanks for the fix, Gabe. I have the 2.2 stable build and am getting a big error when I toggle -- the entire lightbox refreshes and I lose my article. This only happens on one of my sites (one was a clean install, one was an upgrade from 2.1 and the one with problems was an upgrade from 2.2 beta).
There is some magic in the code that you posted that stops it from deleting the article, but it also changes the look of the add new item form. Not a big deal, but what you posted is based on a slightly older version.
Have you had any issues with 2.2 stable?
I'm attaching a new form.php file for 2.2 stable.
The error is pretty basic. On line 274, the href value is #. Setting a link to point to # is always a bad idea for javascript. The href value should be javascript: void(0);
This is because some people set a base document in their template or through SEO components. If the base document is set to the sites root domain, then a link pointing to # will go to site.com/#
piperchick said:Thanks for the fix, Gabe. I have the 2.2 stable build and am getting a big error when I toggle -- the entire lightbox refreshes and I lose my article. This only happens on one of my sites (one was a clean install, one was an upgrade from 2.1 and the one with problems was an upgrade from 2.2 beta).
There is some magic in the code that you posted that stops it from deleting the article, but it also changes the look of the add new item form. Not a big deal, but what you posted is based on a slightly older version.
Have you had any issues with 2.2 stable?
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
14 years 8 months ago #77119
by FeSys
Replied by FeSys on topic Sidebar toggle K2 2.2 bug report and fix
Hey "Gabe"..
You are Right..
Thanks for sharing.
You are Right..
Thanks for sharing.
Please Log in or Create an account to join the conversation.
- piperchick
- Offline
- Premium Member
Less
More
- Posts: 133
14 years 8 months ago #77120
by piperchick
Replied by piperchick on topic Sidebar toggle K2 2.2 bug report and fix
Thanks so much Gabe!!!!
This fixed my issue. I can see the change you made, and there is a foggy understanding as to why but your explanation was also helpful in terms of why it seemed like a random error on one site of the 3 or 4 that I have upgraded.
Thanks again.
This fixed my issue. I can see the change you made, and there is a foggy understanding as to why but your explanation was also helpful in terms of why it seemed like a random error on one site of the 3 or 4 that I have upgraded.
Thanks again.
Please Log in or Create an account to join the conversation.
- Brett Adkins
- Offline
- Junior Member
Less
More
- Posts: 23
14 years 7 months ago #77121
by Brett Adkins
Replied by Brett Adkins on topic Sidebar toggle K2 2.2 bug report and fix
I was having the same problem - new file worked like a charm - thanks for sharing!
Please Log in or Create an account to join the conversation.
- Illés Nagy
- Offline
- New Member
Less
More
- Posts: 1
13 years 6 months ago #77122
by Illés Nagy
Replied by Illés Nagy on topic Sidebar toggle K2 2.2 bug report and fix
This is still a bug in 2.4.1 on my setup, but your modification did the trick. Thank you.
Please Log in or Create an account to join the conversation.
- Alan Murray
- Offline
- New Member
Less
More
- Posts: 4
13 years 1 month ago #77123
by Alan Murray
Replied by Alan Murray on topic Sidebar toggle K2 2.2 bug report and fix
Hi Gabe,
Thanks for this. Absolute life saver.
Alan
Thanks for this. Absolute life saver.
Alan
Please Log in or Create an account to join the conversation.