frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
19.53k stars 6.98k forks source link

ERPNext: v11.1.18 (master) Frappe Framework: v11.1.18 (master) ERPNext: v11.1.16 (master) Frappe Framework: v11.1.16 (master) Products Links Response Contact Form? #16943

Open nsrtky opened 5 years ago

nsrtky commented 5 years ago

Hi, After ı have updated to it latest version Products links broken and started to go Contact link.Its a live at domainerp.com below ı am going to send screen pic also. Centos 7 nginx and Release v11.1.14 image

jottunn commented 5 years ago

confirming this issue on fresh install ERPNext: v11.1.14 (master) Frappe Framework: v11.1.14 (master)

nsrtky commented 5 years ago

confirming this issue on updated version ERPNext: v11.1.15 (master) Frappe Framework: v11.1.15 (master) You can view setting on setup>web sites . However ı have tested entering url to browser url bar then hit enter it still response me contacs page. www.domainerp.com is live you can see problem alive over there.

image

nsrtky commented 5 years ago

May you give us a document how we can see controllers, routes and product's links (related files) its request and response objects? how we should debug in order to be more quick not reading whole code ?

nsrtky commented 5 years ago

ERPNext: v11.1.18 (master)

Frappe Framework: v11.1.18 (master) version updates and still problems goes on and will go on...

clarkejj commented 5 years ago

Discussion is here https://discuss.erpnext.com/t/erpnext-v11-1-16-master-frappe-framework-v11-1-16-master-products-links-response-contact-form/47256

nsrtky commented 5 years ago

Version 11.1.19 its still go on and will go on...

chlarsen commented 5 years ago

I can confirm the same issue on a fresh install of the latest production version. I have created a item group tree, set up routing for different items and get nothing but redirections to te contact form. This is a bit embarrassing especially, as the website worked beforehand like a dream and clients start scratching their heads ;-). Nothing to report from the Nginx front...

chlarsen commented 5 years ago

I am a bit at a loss on how to debug this. My routes are correctly set for item imports, but something seems to mangle them. Or is the routing for the item group tree somewhere buggy, and the Contact Us has been set internally as a default 404 page?

chlarsen commented 5 years ago

I get this, if I go to a variant and want to see its appearance on the website. This never happened prior to the last upgrade that caused all items in item group tree to redirect to the contact form (as outlined above by a number of users). Therefore, this may be related:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 45, in render
    data = render_page_by_language(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 142, in render_page_by_language
    return render_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 158, in render_page
    return build(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 165, in build
    return build_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 187, in build_page
    html = frappe.get_template(context.template).render(context)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/./templates/generators/item.html", line 1, in top-level template code
    {% extends "templates/web.html" %}
  File "/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html", line 6, in top-level template code
    {%- if page_or_generator=="Generator" %}source-type="Generator" data-doctype="{{ doctype }}"{% endif %}
  File "/home/frappe/frappe-bench/apps/frappe/frappe/./templates/base.html", line 38, in top-level template code
    {% block body %}
  File "/home/frappe/frappe-bench/apps/frappe/frappe/./templates/base.html", line 64, in block "body"
    {% block content %}{% endblock %}
  File "/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html", line 49, in block "content"
    {%- block page_content -%}{%- endblock -%}
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/./templates/generators/item.html", line 29, in block "page_content"
    {% set first_image = slideshow_items[0]['image'] %}
  File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/jinja2/environment.py", line 411, in getitem
    return obj[argument]
UndefinedError: list object has no element 0

Let me know, if this helps... Chris

chlarsen commented 5 years ago

I have just installed the latest production upgrade, but, alas, no imrovement could be noted. I do consider this issue as a pretty critical bug, as it (a) directly affects the external appearance of the public website and (b) happens "straight from the can" on virgin installs using the recommended install.py method. May I politely ask again the core developer team for some hints how to debug this beyond the little I could achieve so far? Or where to look for the (obvious?) bug? Thank you!

ovresko commented 5 years ago

Found a workaround Go to Shopping Cart Settings enable accept payments + Set modatory fields (series, company ...) Save and reload website deactivate Shpping Cart after

issue here https://github.com/frappe/erpnext/blob/5f8b358fd4746394cbe5c349b0e5bd1280c5af3a/erpnext/shopping_cart/cart.py#L390

chlarsen commented 5 years ago

Dear Ovresko, Indeed! Thank you so much. This was a bit hard to find, but now, as I saw the code.... :-). Hugely appreciated! Chris