Possible CSS change has killed site :(

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #339874

-- url of the page with the problem -- : agjewellery.uk/
-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.4
-- PHP version -- : 7.4.24
-- Browser(s) name and version -- : Firefox 91.4
-- Error-message(debug-mod must be tuned on) -- : 0
syntax error, unexpected '='

Yep - I've done THAT stupid thing - changing CSS without taking a backup or checking I'd not made any errors in the doing of it, although TBH I only did a copy/[paste on one file and don't think I even changed anything in the other (but might have accidentally).

Basically I was trying to get the Product Code to be displayed on the item page so after some searches here, I found this info:

For the product page, you can just remove the CSS:
.hikashop_product_code_main {
display: none;
}

from the front end css file of hikashop (you can edit it in the config under the tab display).

For the listings, the product code is actually not displayed at all. So you will have to edit the file listing_img_title of the view product via the menu Display->Views and add the code:
echo $this->row->product_code;
before or after the code:
echo $this->row->product_name;


I couldn't locate the first bit of info in that CSSfile anywhere, so only did the 2nd part which worked fine.

The only other change I'd then made didn't involve CSS but just enabling the Product Code to be displayed in the Config section.

It seemed to all be fine initially but then suddenly when I went back to view the site I discovered the error above, and even Max error reporting is giving me nothing - so I've no idea which file to look at or whether it's something else entirely.

I've just updated the site from the previous version to 4.5 but even that hasn't helped as I'd hoped.

Any ideas on what else to check as I can't see what I could have done wrong to cause this major issue.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #339875

Hello,

Use a code editor to analyze your listing_img_title file because your current error is a php type error.
A good code editor tool is able to find and underline it in red most of php code error.

OR more quick, but also the least subtle...
If you have process via an override view (see this documentation ) then delete this override view (by clicking on the little trash icon).

If you have directly modify your listing_img_title file, then download the hikashop package, and inside you will find a default listing_img_title file (in hikashop.zip\front\views\product\tmpl\listing_img_title).
Use this default file, to replace your current view file (with the error).

Hope this will help you to solve this situation.
Regards

Last edit: 2 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #339894

Thanks SO much Philip for your speedy help - unfortunately as yet, I've not managed to resolve whatever damage I did by replacing the listing file. Can you maybe confirm which folder on the site I need to upload the listing_img_title file to, as while I found a "front" in the hikashop zip file, I couldn't find that folder on the site?

I couldn't access the link you provided on Overrides (just kept reloading this page) so I'm just working through uploading various files in the hope one will work to fix the problem. I'm willing to lose some work if I have to, but am finally now backing up all my shop keys etc from the database, so that I can at least recover those if I make any other errors.

I'm unsure with the PHP file as there's a LOT of red from the start & I've no idea what that means. I'm also pretty sure I didn't touch any PHP files to edit as it was purely a CSS issue I was trying to fix. So if a PHP file has got changed I've no idea how.



But if you can spot anything obvious perhaps you can advise how to fix?
Thanks again
Romayne :)

Attachments:
Last edit: 2 years 8 months ago by Delta99.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #339895

Hello,

My bad for the documentation link, here this will better work.

Now, in order to learn more about your error, please use the Joomla debug (level maximum)
- Go to System dropdown, then System tab, Active Debug System AND in Server tab, set Error Reporting on Development.
=> Provide the result screenshot with the error more detailed.

Awaiting your returns to progress
Regards

Last edit: 2 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #339998

Thanks Philip
But see that's another thing that's stumping me - with all those settings on Maximum etc, there's not a sign of any error message displayed on the front page with the normal template.

I did notice if I switched to the Beez3 template I could at least see some provided so have done that for the purpose of gaining help with the issue (makes me wonder if it's not related to the template - ATJewellery from Age Themes but they don't think so, and I didn't make any changes to it on the day in question) .

Anyway - with Debug set I got this error msg (on the Home page with Beez3)

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 67368631 bytes) in /home/sites/1a/7/7fc4c828d7/public_html/plugins/system/debug/debug.php on line 1247

So I knocked off the Debug - the main errors then showing up are all just relating to the catalogue of items available in the shop (unlike with the AT template, in Beez3 all the items are displayed on the Home page rather than their separate categories etc.

This error shows up above each item:
/tmpl/show_popup.php on line 23
Black Magic necklace
Notice: Undefined index: product_popup_mode in /home/sites/1a/7/7fc4c828d7/public_html/components/com_hikashop/views/product/tmpl/show_popup.php on line 23 AGJN01

Then further down the page is more along the lines of the screenshot - lots and lots of files with the same errors shown.

Not sure if any of that will make much sense to you.

I couldn't figure out from the Debug sections what you might want to view so haven't put anything of it up here. If you feel you'd need it can you clarify which sections?

Happy to provide you access if it comes to it :)
Thanks again

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #340002

Hello,

Yes please provide us these references in order to allow us to process some test directly on our website :
- Url link to your backend
- Backend user references (with maximum Acl)

Note : Use our Contact us form to provide these elements, and don't forget to add an Url link to this subject.

Awaiting your elements to progress on your subject.
Regards

Last edit: 2 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #340030

Hello,

Step by step :
=> Remove your override view "listing_img_title", solve most of your issue "that break your site"
=> It seems that "System - Helix3 Framework" generate lots of error, and even in your backend !
In order to be able to reach your Item Menu configuration, we have to desactivate the plugin system.

We were able to see your notice ("Notice: Undefined index: product_popup_mode in /home/sites/1a/7/7fc4c828d7/"), but unfortunately we are unable to reproduce this issue on our localhost, and to understand why we are afraid that your site is not healthy enough to allow us to understand the origin of this problem.

The best would be to first solve the major problem apparently caused by your template (and System - Helix3 Framework).
Sorry for this return, so far we can't really help you much more.
Regards

Last edit: 2 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #340274

Hi Philip
Sorry for delay in returning to you on this After taking the above steps and still no change, I've sort of got to the point on this that I think rather than taking more time trying to figure out where the problem lies as it doesn't appear to be anything simple, I'll just start over. The site's already been down over a fortnight and I really can't take another 2-3 weeks to try and get it fixed without any guarantee the outcome mightn't be the same when i could use that time to recreate it again. Truly NO idea how I missed taking a backup of it when it was working & before making the changes as I'm not normally so lax, but lesson learnt yet again!!

So thank you for your time & effort and hope when I do get it done I'll just leave well alone and put up with the minor styling issues that got me into this mess in the first place :(.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #340276

Hello,

Really sorry to read this news...
We are not really happy to leave you where you are now...
Can you tell us the different problems that persist (and the links for each of these different problems) ?

Also, if the issue comes from a view override, I would recommend you to check the folder templates/YOUR_TEMPLATE/html/com_hikashop/
That's where you'll have all the view overrides you've made for your HikaShop.
There, you can rename the files to disable the overrides. So it's an easy way to identify which view override is causing the problem and to disable it. And if it doesn't come from any of the view files there, then it's probably something else.

Regards

Last edit: 2 years 8 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #340288

Ahh thanks SO much Philip - appreciate your extra info as TBH I wasn't so sure on how to fix the overrides issues either. I'll get stuck in to those on Monday and then see where I'm at, but I'm more veering towards a template issue although Age Themes haven't been able to isolate the problem their end. It's just that if I switch to a different template things work reasonably well and it's only when I switch back to their template that the 0 error pops up again ( https://agjewellery.uk/index.php/jewellery-shop/necklaces )- oddly though it's persistent even with another template on one link alone, so it may still be something involving both HKS and the template together. (Ignore the overall look of the site as I've removed a lot of modules just because of layout issues on the Protostar template).

I did all the Helix3 updates but they didn't resolve it either.

So much confusion in that respect which was what made me feel it would be simpler at this relatively early stage to just start over again, but I'll try a few more tweaks first as you suggest and see what happens.

I'll come back to you early next week with an update.
Thanks again!

The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 8 months ago #340310

Hello,

For the "0 syntax error, unexpected '='", we know were the error come from, see my screenshot :



Save on your side the code view, and analyze the code with a good code editor (which should point out your mistake).
But anyway remove this custom view will solve this issue.

Regards

Last edit: 2 years 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 20
  • Thank you received: 3
2 years 8 months ago #340321

Philip wrote: Hello,
Also, if the issue comes from a view override, I would recommend you to check the folder templates/YOUR_TEMPLATE/html/com_hikashop/
That's where you'll have all the view overrides you've made for your HikaShop.
There, you can rename the files to disable the overrides. So it's an easy way to identify which view override is causing the problem and to disable it. And if it doesn't come from any of the view files there, then it's probably something else.
Regards


YAYYYY - THAT worked perfectly Philip. Thank you SO much for sticking with me and saving me a headache. Now I'm off to get the site fully backed up to save me such hassles the next time I make silly errors like this! Much appreciated.

I say it again - HikaShop is one of THE best programs I've come across for the incredible software you produce & also for your service - I used to use Virtuemart for the shop but it was just so hard to work with and get support for unless you paid a LOT! So to have this provided free is phenomenal and I hope you can continue to do so for a long time to come!

Thanks again

The following user(s) said Thank You: Philip

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum