Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error Cannot redeclare InfiniteScrollElementorNameSpace\Widgets\ISEcolor() #1

Closed
alexschwantes opened this issue Oct 15, 2020 · 6 comments

Comments

@alexschwantes
Copy link

I had set up infinite scroll on a blog archive and all was working fine, when I thought I would test out the read more button.
I added it below the infinite scroll and disabled the scrolling. After saving it, I now get an error.
This error is present when viewing the blog archive and also kills elementor when trying to edit the template now

Fatal error: Cannot redeclare InfiniteScrollElementorNameSpace\Widgets\ISEcolor() (previously declared in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\infinite-scroll-elementor-master\includes\widgets\infinite-scroll-elementor-ise.php:261) in C:\xampp\apps\wordpress\htdocs\wp-content\plugins\infinite-scroll-elementor-master\includes\widgets\button-load-elementor-ise.php on line 276

This is the _elementor_data from postmeta for the post

[{"id":"ea61f42","elType":"section","settings":{"padding":{"unit":"%","top":"3","right":"0","bottom":"0","left":"0","isLinked":false}},"elements":[{"id":"70275a3","elType":"column","settings":{"_column_size":100,"_inline_size":null},"elements":[{"id":"74e03991","elType":"widget","settings":{"__dynamic__":{"title":"[elementor-tag id=\"\" name=\"archive-title\" settings=\"%7B%22include_context%22%3A%22%22%7D\"]"},"title":"Add Your Heading Text Here","align":"left","title_color":"#000000","typography_typography":"custom","typography_font_family":"Montserrat","typography_font_size":{"unit":"px","size":"55","sizes":[]},"typography_font_weight":"100","typography_text_transform":"uppercase","typography_font_size_tablet":{"unit":"px","size":"50","sizes":[]},"typography_font_size_mobile":{"unit":"px","size":"30","sizes":[]},"animation_duration":"slow"},"elements":[],"widgetType":"theme-archive-title"},{"id":"5367b3b6","elType":"widget","settings":{"editor":"<p>Lorem ipsum dolor sit amet, cons ectetur adipis cing elit, sekido alor eiusmod oplot tempor alor incididunt labore et dolore magna epoyt aliqua erolp shulp sed adip lrty opti iscing diam donec facilisi nullam vehicula ipsum atdi arcu cursus off vitae congue amet estyt.<\/p>","align":"left","text_color":"#000000","typography_typography":"custom","typography_font_family":"Montserrat","typography_font_size":{"unit":"px","size":"16","sizes":[]},"typography_font_weight":"200","__dynamic__":{"editor":"[elementor-tag id=\"d3f9931\" name=\"archive-description\" settings=\"%7B%7D\"]"}},"elements":[],"widgetType":"text-editor"}],"isInner":false}],"isInner":false},{"id":"1a0b60f2","elType":"section","settings":{"layout":"full_width","padding":{"unit":"%","top":"0","right":"5","bottom":"0","left":"5","isLinked":""},"margin":{"unit":"px","top":"0","right":0,"bottom":"100","left":0,"isLinked":""},"_title":"Hero Pic","margin_tablet":{"unit":"px","top":"50","right":"0","bottom":"100","left":"0","isLinked":""},"_timestamp_":"v1bzRGNGQ3L2NpOUk5RmJHaVo3ZCtjQT09"},"elements":[{"id":"39cb2278","elType":"column","settings":{"_column_size":"100","padding":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":"1"}},"elements":[{"id":"46052c70","elType":"widget","settings":{"image":{"id":9228,"url":"http:\/\/localhost\/wordpress\/wp-content\/uploads\/2020\/10\/Blog-Pic.png"},"image_size":"full","width":{"unit":"%","size":80,"sizes":[]},"motion_fx_motion_fx_scrolling":"yes","motion_fx_translateY_effect":"yes","motion_fx_translateY_speed":{"unit":"px","size":"2","sizes":[]},"motion_fx_devices":["desktop"],"__dynamic__":[]},"elements":[],"widgetType":"image"}],"isInner":""}],"isInner":""},{"id":"4a619e4e","elType":"section","settings":{"layout":"full_width","padding":{"unit":"%","top":"0","right":"5","bottom":"0","left":"16","isLinked":""},"_title":"Our Articles Title","padding_mobile":{"unit":"%","top":"0","right":"5","bottom":"0","left":"5","isLinked":""},"overflow":"hidden","_timestamp_":"v1bzRGNGQ3L2NpOUk5RmJHaVo3ZCtjQT09"},"elements":[{"id":"2e9c102d","elType":"column","settings":{"_column_size":"100","content_position":"center","padding":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":"1"},"motion_fx_motion_fx_scrolling":"yes","motion_fx_translateX_effect":"yes","motion_fx_translateX_speed":{"unit":"px","size":"1","sizes":[]},"motion_fx_translateX_affectedRange":{"unit":"%","size":"","sizes":{"start":"0","end":"50"}},"motion_fx_devices":["desktop"]},"elements":[{"id":"2e6c15e","elType":"widget","settings":{"align":"left","text":"Our <b>MENTIONS<\/b>","look":"line_text","typography_typography":"custom","typography_font_family":"Montserrat","typography_font_size":{"unit":"px","size":"35","sizes":[]},"typography_font_weight":"200","typography_text_transform":"uppercase","text_align":"left","text_spacing":{"unit":"px","size":"50","sizes":[]},"color":"#000000","text_color":"#000000","typography_font_size_mobile":{"unit":"px","size":"25","sizes":[]},"text_spacing_mobile":{"unit":"px","size":"15","sizes":[]}},"elements":[],"widgetType":"divider"}],"isInner":""}],"isInner":""},{"id":"66e84d1a","elType":"section","settings":{"layout":"full_width","padding":{"unit":"%","top":"0","right":"16","bottom":"0","left":"16","isLinked":""},"margin":{"unit":"px","top":"100","right":"0","bottom":"0","left":"0","isLinked":""},"_title":"Articles","margin_tablet":{"unit":"px","top":"50","right":"0","bottom":"0","left":"0","isLinked":""},"padding_tablet":{"unit":"%","top":"0","right":"5","bottom":"0","left":"5","isLinked":""},"_timestamp_":"v1bzRGNGQ3L2NpOUk5RmJHaVo3ZCtjQT09"},"elements":[{"id":"46dabf8a","elType":"column","settings":{"_column_size":"100","padding":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":"1"}},"elements":[{"id":"59363aa1","elType":"widget","settings":{"_skin":"cards","classic_posts_per_page":"3","classic_show_excerpt":"","classic_meta_data":["date"],"classic_meta_separator":"\/\/\/","classic_show_read_more":"","classic_read_more_text":"Read More \u00bb","cards_show_excerpt":"","cards_meta_data":["date"],"cards_meta_separator":"\u2022","cards_show_read_more":"","cards_read_more_text":"Read More \u00bb","cards_show_badge":"","cards_show_avatar":"","full_content_meta_separator":"\/\/\/","classic_column_gap":{"unit":"px","size":"50","sizes":[]},"classic_row_gap":{"unit":"px","size":"50","sizes":[]},"classic_title_color":"#000000","classic_title_typography_typography":"custom","classic_title_typography_font_family":"Montserrat","classic_title_typography_font_size":{"unit":"px","size":"16","sizes":[]},"classic_title_typography_font_weight":"300","classic_title_spacing":{"unit":"px","size":"10","sizes":[]},"cards_column_gap":{"unit":"px","size":"50","sizes":[]},"cards_row_gap":{"unit":"px","size":"50","sizes":[]},"cards_card_border_width":{"unit":"px","size":"0","sizes":[]},"cards_card_padding":{"unit":"px","size":"0","sizes":[]},"cards_box_shadow_box_shadow_type":"","cards_hover_effect":"none","cards_meta_border_color":"#000000","cards_image_spacing":{"unit":"px","size":"0","sizes":[]},"cards_title_color":"#000000","cards_title_typography_typography":"custom","cards_title_typography_font_family":"Montserrat","cards_title_typography_font_size":{"unit":"px","size":"16","sizes":[]},"cards_title_typography_font_weight":"300","cards_title_spacing":{"unit":"px","size":"15","sizes":[]},"cards_meta_color":"#000000","cards_meta_separator_color":"#000000","cards_meta_typography_typography":"custom","cards_meta_typography_font_family":"Montserrat","cards_meta_typography_font_size":{"unit":"px","size":"14","sizes":[]},"cards_meta_typography_font_weight":"300","pagination_page_limit":"500","pagination_prev_label":"&laquo; Previous","pagination_next_label":"Next &raquo;","posts_include":[],"posts_include_term_ids":["8"],"posts_post_type":"current_query","cards_posts_per_page":12,"posts_ignore_sticky_posts":"","posts_query_id":"posts","pagination_type":"prev_next"},"elements":[],"widgetType":"posts"},{"id":"585818b","elType":"widget","settings":[],"elements":[],"widgetType":"spacer"},{"id":"e367a8f","elType":"widget","settings":{"ISE_register":"","infinite_scroll_elementor_loading_text":"Loading...","infinite_scroll_elementor_last_text":"You have made it to the end!","infinite_scroll_elementor_error_text":"No post here!","infinite_scroll_status_loader_bottom_spacing":{"unit":"px","size":23,"sizes":[]},"_padding":{"unit":"px","top":"0","right":"0","bottom":"0","left":"0","isLinked":false},"__globals__":{"infinite_scroll_loader_color":"globals\/colors?id=primary"}},"elements":[],"widgetType":"infinite-scroll-elementor-widget"},{"id":"b1d58d9","elType":"widget","settings":{"ISE_register":"yes","button_load_elementor_button_text":"More Posts","button_load_elementor_loading_text":"Loading...","button_load_elementor_last_text":"You have made it till the end!","button_load_elementor_error_text":"No post here!"},"elements":[],"widgetType":"button-load-elementor-widget"},{"id":"637d2c2","elType":"widget","settings":[],"elements":[],"widgetType":"spacer"}],"isInner":""}],"isInner":""}]

Also, just thought I would add it looks like a nice plugin, will you add it to wordpress library?

@alexschwantes alexschwantes changed the title Fatal error Fatal error Cannot redeclare InfiniteScrollElementorNameSpace\Widgets\ISEcolor() Oct 15, 2020
@alexschwantes
Copy link
Author

I fixed the page by manually removing the following infinite scroll section from the postmeta.

I also managed to reproduce the issue, even with only one infinite scroll on the page. Essentially, add it to the page and then set the animation colour (I set it to the primary global colour), then try to save it and it will throw the error.

@joychetry
Copy link
Owner

Thanks for reporting this issue.
Please confirm the errors,

  1. Does the first error occur only while using the widget two widgets below one another?
  2. I am having some issues with Wordpress Plugin Repository, I am trying my best to put it up. If you are worried about updates then, once you install this plugin you will receive regular updates inside Wordpress.
  3. Error regenerates when changing animation color?

I will fix them in the next update.

@joychetry
Copy link
Owner

Issues are fixed and a new version has been released.

@alexschwantes
Copy link
Author

Awesome, thanks for the speedy response, I was able to update it via wordpress plugins 👍

@alexschwantes
Copy link
Author

So I did some more testing and it seems to be partially fixed. The first time I add the button to the page I can set the colour correctly and save it, however, if I make any other changes to the page, even unrelated to the button and publish the page again I get the following error.

[Sat Oct 17 20:29:24.749720 2020] [php7:error] [pid 13424:tid 3632] [client ::1:9698] PHP Fatal error: Cannot redeclare InfiniteScrollElementorNameSpace\\Widgets\\ISEButtoncolor() (previously declared in C:\\xampp\\apps\\wordpress\\htdocs\\wp-content\\plugins\\infinite-scroll-elementor-master\\includes\\widgets\\button-load-elementor-ise.php:279) in C:\\xampp\\apps\\wordpress\\htdocs\\wp-content\\plugins\\infinite-scroll-elementor-master\\includes\\widgets\\button-load-elementor-ise.php on line 276, referer:

Steps:

  1. Add button loader to archive
  2. publish page
  3. Button works correctly
  4. Make some changes to the page and publish again
    Result: above PHP Error

@joychetry
Copy link
Owner

Thanks for reporting @alexschwantes , I have fixed the issue and released a new version.
The above issue existed because of the duplicate function being generated when the user adds Button Load/Infinite Scroll more than once on the same page.

Kindly test the new version and keep doing what you do 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants